I need help to convert the column D into two decimal. I have tried using format value but it don’t work due to it only accept the var as generic value. Once i use read range and get a Var, the var will become datatable and it won’t be able to work in format value. Please help how am i going to change to two decimal place?
we can convert as following
An essential approach could look like:
- use a for each row and iterate over all rows
- use an assign for douing the conversion row(YourColNameOrIndex) = Convert.ToDouble(row(YourColNameOrIndex)).ToString(“F2”)
Hi @Anneng ,
Take a look on this.
conversion row(YourColNameOrIndex) = Convert.ToDouble(row(YourColNameOrIndex)).ToString(“F2”)
Do you have a sample? I can’t follow and what does convert.ToDouble means?
Thanks, I will test it out now.
I have error Write Line: Format specifier was invalid.
I change the column 0 to my column index 8 and the F2 to another cell. It seem like cannot work on write line.
Maybe you can explain Convert.ToDouble(CurrentRow(0)).ToString(“F2”), how does it work?
By the way how do you write the result back to the excel? Write line is only on the uipath system. I try write range and write cell, does not seem to be working.