How to change the invalid number format

Hi Team,

I have one datatable column values some invalid number format came so i want change correct format

Please help me anyone for this

Input:
image

Expected output:
image

Regards,
Raja G

HI,

How do we identify decimal separator and thousand separator?
If we can assume they always have two decimal places, how about the following?

Sample
Sample20240626-4.zip (9.6 KB)

Regards,

1 Like

Hi @Raja.G

=> Read Range Workbook
Output → InputDt
image

=> Use below syntax in Assign:

InputDt = (From row In InputDt.AsEnumerable()
           Let newDesc = If(row("Desc").tostring.Contains(","),row("Desc").ToString.Replace(".", "").Replace(",", "."), row("Desc").ToString)
           Select InputDt.Clone().LoadDataRow(New Object() {row("Name"), CDbl(newDesc)}, False)).CopyToDataTable()

=> Write Range Workbook InputDt into new sheet
image

Hope it helps!!

1 Like

Hi @Parvathy and @Yoichi ,

Thank you so much working fine.

Regards,
Raja G

1 Like

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