variable.Replace doesn't replace cell value


#1

Hi guys

I have an excel file where i want to remove “,” in all my rows so i used the syntax:

item.ToString.Replace(",","")

But somehow it doesnt work.
When i print out the value to a message box with the replace-method then it works like charm.

What can be the solution?

Attached screenshots:




#2

Hi @Ibra, instead of assign the replaced value to amazonStr, you should overwrite your current value in your DataTable.

row(“Price”) = row(“Price”).toString().Replace(",","")

Hope this helps.

Cheers.


#3

Unfortunately it didnt work :frowning:


#4

Is it possible for you to upload your xaml file?


#5

amazoniPhoneX.xlsx (9.2 KB)
DataComparison.xaml (89.1 KB)


#6

DataComparison(modified).xaml (85.1 KB)

Hi @Ibra, I did some changes to your action. Instead of appending to excel each row, I write the excel at the end of process. The reason your replace is not working is because the row you were using wasn’t referring to the row in your amazonData Data Table. Just run the workflow and let me know :slight_smile: You should find an excel named amazoniPhoneX1.xlsx


#8