Bug 146741 - Importing csv removes dot in some numbers and not in other numbers
Summary: Importing csv removes dot in some numbers and not in other numbers
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-13 14:59 UTC by Joachim Jacob
Modified: 2022-01-13 16:12 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Sample to describe bug that removes decimal separator (166 bytes, text/csv)
2022-01-13 14:59 UTC, Joachim Jacob
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Jacob 2022-01-13 14:59:16 UTC
Created attachment 177525 [details]
Sample to describe bug that removes decimal separator

Hi,

This is hurting me for over 4 years. 

From IT i get exports stats in .csv. Decimal numbers for this export are '.'. When importing to do my analysis with Libreoffice Calc, I found that some numbers had their decimal separator removed.

This causes huge problems in my file with thousands of lines.

I looked further: it seems to happen with numbers with three (3) numbers after the decimal separator.


E.g. 
a number 12.47788439306359 is correctly imported
a number 80.824 is wrongly imported and transformed to 80824.

I used to manually correct them. 
I used to use awk to extract the column and import it somehow separately.

Finally I got some courage to report it.

Configuration of my Libreoffice calc
- Dutch locale
- decimal separator = equal to locale (,)
Comment 1 Eike Rathke 2022-01-13 16:12:23 UTC
Make sure that in the CSV Import dialog you set the proper import locale, i.e. here an English (probably English-US) locale. For your Dutch locale has ',' comma decimal separator and '.' group separator, the dot in the numbers is taken as group separator (if thousands separator, thus multiple of three digits to the right) else the character sequence is imported as text instead of numeric value.

Another possibility is, again in the import dialog, to set specific column types to English-US.

Not a bug.