Help with data table issue

Hi everyone, I have a data table containing prices, that also have the currency symbol. Can someone help me remove it?

Thanks in Advance.
Regards,
Divya Kulkarni.

Hi @Divya_Kulkarni

Where is the symbol? before the price or after it.
Can you please give me a screenshot of the column price?

Hi,
The symbol is before the price. Sure, I have attached the screenshot.query

Add Read Range Activity and save the data in variable ExcelDT for example
Add For Each Row activity
Add Assign acitivty in it:
row(“Product_Price”) = row(“Product_Price”).ToString.Replace(“$”,“”)
Instead of $ set your currency

See the attached file
Sequence25.xaml (6.1 KB)

Best regards
Mahmoud

1 Like

Hi @Divya_Kulkarni ,

You can also use Linq.
The query will change it’s format instead of replacing symbol.

(From r In dt Select dtOutput.LoadDataRow(New Object() { r.Field(of Object)(“Product_Name”), CInt(r.Field(of Object)(“Product_Price”)).ToString(“N2”) },False)).CopyToDataTable

I have attached output of this query
Check out the result.
ReplaceCurrecySymbol.xlsx (9.7 KB)
ReplaceCurrecySymbol.xaml (5.9 KB)

1 Like

Thanks a lot. It works.

Thank you @ermanoj3101 .

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.