Format and commas when writing datatable to Excel table

Hello, I ran into a problem i hope to get some help with. I am writing a datatable to a table in Excel and get inconsistent formating. I have tried to format in excel before writing, but no luck. All columns in datatabe is set to string.

I do not understand why it treats the last columns different (like i want it to be) in regards to the “,” in the string. I want them all to be like the last column with the 465,50

For example in the excel in kolumn J (first row) i need 148,9600

Very greatful for any ideas.
Kindly
Johan

Hi @Johan2

Your query is quire confusing could you be more specific and explain more then only we will understand and provide you the proper answer.

1 Like

Indeed.
When I write the illustrated datatable to the illustrated Excel-table the format turns out different in the Excel-table.

“465,50” ends up “465,50”
but in the column before
“148,9600” ends up “1 489 600”

And if I try and write it to Excel outside of the Excel-table, it still formats the last two columns different (see below).

Could it be because one have four digits after the “,” (148,9600) and the other only have two digits after the “,” (465,50)?

The source of the Datatable is a txt-file: