Hi, i am data scraping a website to datatable that goes to excel then i want it to do add the total amount. this issue is, it does not like the $ sign. this is the only issue i have, what is the easiest way to trim the $ automatically when the new column is being created on the spreadsheet?
Use this in for each row in datatable activity
row("Total Amount") = Convert.ToDecimal(row("Total Amount").ToString().Replace("$", "").Trim())
Regards,
In the Extraction choose Number,This is the sample,i don’t have the sample website to show you the proper extraction
As you can see from your example, the $ will cause an error. You can’t convert “$1.23” into a number.
- For Each Row in Data Table
-- Assign CurrentRow("Price") = CurrentRow("Price").Replace("$","")
That’s it. Easy and done. Just replace Price with whatever your column name is.
i used the for each row, then i used the assign activity and put totalamount = the above expression but i am getting an error. it does not like the expression
You have to do like below
CurrentRow("Total Amount") = Convert.ToDecimal(CurrentRow("Total Amount").ToString().Replace("$", "").Trim())
Can you show the screenshot how you are trying
Regards,
@katherine.a.lyons6.civ just do this, it’s simple.
Have you tried changing the datatype of the column in extraction wizard?
Thanks,
Ashok ![]()
Hie @katherine.a.lyons6.civ there is multiple way to remove $ from your excel row data
1- when you use scrapping toot there is a option in that wizard that hold number value so when you apply this it will remove the $ from all the records
2- method you can use replace manipulation to remove $ from your row data
Cheers Happy Automation…

