Copy csv file to excel with decimal problem after decimal point

sorry :slight_smile:
The value “102,562” should read “one hundred and two”

grafik

2 Likes

In that case your system - system locale - is set-up to interpret comma as thousands separator (not decimal separator) → before writing to Excel replace comma “,” by point “.”

And indeed check your system locale.

Cheers

1 Like

@ppr
so i need to use read column activity after copying the csv file in the excel file and replace it instead of 102,562 in your sentence right ?
Double.Parse(ColonneDecimal.ToString, System.Globalization.CultureInfo.CreateSpecificCulture(“fr-FR”)).ToString

@J0ska
i have any problem if the number have 2 decimal ==> example 120,05
but if the number is 120,503 it doesnt work

Hi @Soudios

Refer the thread

Regards
Gokul

1 Like

@Gokul001
it doesnt work

Sure, bcause it is thousands separator.

1 Like

i need to keep this configuration system in my computer

Hi @Soudios


It’s Working Check the screenshot.

Regards
Gokul

1 Like

@Gokul001

Its working with a specific number i need it to work with a hole csv file

Hi @Soudios

Share the CSV file

1 Like

@Gokul001
I can’t share it with you, what do you need to know about the csv file ?

Hi @Soudios

Can you share a dummy CSV file and error screenshot

1 Like

As stated before it seems to be locale settgins conflict:

  • your CSV is using comma as decimal separator
  • your system is comma as thousands separator

I recommend you to resolve it by replacing “,” by “.” in your number, e.g.
MyNumber = “123,456”
MyNumber = MyNumber.replace(“,”,“.”)

This is a dummy solution but should work.

Cheers

1 Like

image
image


image

image

@Soudios

Can you share the Dummy CSV file?
Otherwise, I cant help you…

1 Like

Here an example of numbers with 2 decimal after coma
image

in your code i need to replace “MyNumber” by a csv file

The solution proposed by @ppr before works well for all variants:
1 234,56 → 1234.56
234,56 → 234.56
234,567 → 234.567
1 234,567 → 1234.567

MyNumber = “1 234,56”
MyNumber = Double.Parse(MyNumber, System.Globalization.CultureInfo.CreateSpecificCulture(“fr-FR”)).ToString

Howgh

1 Like