i have lots of values in my data table that contain commas e.g. “2,7” but i want to replace that comma with a full stop E.G “2.7”. how can i archive this for all values in datatable?
Hi @Rowley101
You can use this condition in Assign activity inside For Each Row in Data Table
CurrentRow("Column Name")=CurrentRow("Column Name").ToString.Replace(",",".")
Hope it helps!!
Does that mean i have to do that for every column?
@Rowley101
It will do for every row of a particular Column.
Regards,
where we just adapt:
Replace(",",".")
Hi @Rowley101
=> Use the read range workbook activity to read the rows in the excel and store in a datatable.
=> Use for each row in datatable activity to iterate the rows in the datatable.
=> Inside for each insert the Assign activity and give the below expression
- Assign -> row("ColumnName") = row("ColumnName").ToString().Replace(",", ".")
=> After for each activity insert the Write range workbook activity to write the same datatable to same excel.
Hope it helps!!
Hi @Rowley101, You can try to use the following
convert to string the dataTable with Output Data Table Activity and then remplace all “,” in string
and after you can generate again the data table from that string with Generate Data Table Activity
in option use the next
I hope it can help you