Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSV decimal dot in Excel

Tags:

csv

excel

I have a CSV file with the following values:

3271.96;274;272;1;1;0;1;0.071690;0;0;0;0;0;0;1.753130;1.75;0;1.75; 

But when I open the file with Excel I get this:

3271.96 274 272 1   1   0   1   0.071690    0   0   0   0   0   0   1.753.130   1.75    0   1.75 

Why is "1.753130" converted into "1.753.130"? (1.753130 is a decimal number) how can I "force" Excel to understand that these are decimal numbers?

I create the CSV file with a web application, so is difficult just modify my Excel configuration because many people visit my website and download the CSV file to their machines.

like image 253
Naty Bizz Avatar asked Jul 10 '12 20:07

Naty Bizz


People also ask

How do I change comma to dot in CSV?

Either to replace the comma to a dot - OR - save using a ";" (semicolon) as delimiter. CDD does recognize ";" as delimiter in a CSV file as well!

How do I create a dot as a Decimal separator in Excel?

Click File > Options. On the Advanced tab, under Editing options, clear the Use system separators check box. Type new separators in the Decimal separator and Thousands separator boxes.

Can CSV files have decimals?

CSV file, you cannot keep decimal digits directly. However, you can change the number of decimal places that are displayed for this value. For example, when the data is like 123457.78 in the underlying data, you can change decimal places as 0 to display is like 123457 to export as a . Csv.


1 Answers

For users seeking to this question with newer Excel versions like Excel 365... As written at Professor Excel you could activate/restore "From Text (Legacy)" in the settings.

My prefered solution

File - Options - Data 

Excel settings - From Text(Legacy)


Then you will be able to get the old import wizard... legacy but in my opinion more intuitiv.

Link to legacy import wizard


Other possibilities

At that linked Professor Excel website there are also shown other possibilities. With Excels new import dialog, if you have several columns with numbers all in a different locale to your computers locale settings, then it will be much more effort to do the import. With the old wizard you are set within a minute. With the new import dialog I haven't found yet a method to be as fast as with the legacy import method.

like image 178
MarkusEgle Avatar answered Oct 06 '22 22:10

MarkusEgle