Double.parse error


What are you trying to achieve?

hi @postwick

i have Decimal separator problem with csv file
in the csv file i have : 101,789 and after read it and copy it in excel i have 101789

have a view on this


1 Like

Hi @Soudios

Try to use the below expression

Double.Parse(ColonneDecimal.ToString, NumberStyles.Currency,System.Globalization.CultureInfo.CreateSpecificCulture("fr-FR")).ToString


Don’t create multiple posts asking the same question.

As I said in your other post, it’s Excel formatting that is removing the comma. Adjust the number formatting in Excel to include the , separator.


ColonneDecimal is a read colum but it doesnt work did i need to put the data table of the hole excel file ?
if yes i have this error

how can i do that plz ?

You have something wrong in your activity. Show us your activities, and how their properties are configured.


ExcelRempli is a data table

You can’t convert a datatable to a string.

If you don’t explain what you are trying to accomplish, we can’t help you.

To copy a csv file into an excel i use read csv and write it in a excel file, this part work well but when i check the result a have a difference on number

in the csv file i have : 102,562 and after copy i have 102562

I don’t understand because i have no problem with 2 decimal only if the number have 3 decimal after decimal point

So i tried to resolve the problem with this code :
Double.Parse( ExcelRempli.ToString, System.Globalization.CultureInfo.CreateSpecificCulture(“fr-FR”)).ToString

But it doesnt work

The question is how can i use this code to change all the excel file or at least a column


The problem is from the csv file

It doesn’t work because you are trying to convert a datatable to a string with ExcelRempli.ToString - and this makes no sense.

Again, Excel parses data to try to figure out how to format it. You’re sending it a number and it’s displaying it based on the default number format. Set the formatting of the column in Excel. Converting (parse) the number isn’t going to change this.

the problem is when i read the csv file and put it in excel, i already changed the format column in excel and it doesnt work

Refer the below thread @Soudios