Bug 135994 - Offer an optional target locale for export to CSV
Summary: Offer an optional target locale for export to CSV
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
Depends on:
Blocks: CSV-Dialog
  Show dependency treegraph
Reported: 2020-08-21 18:33 UTC by linus.kardell
Modified: 2020-08-28 17:27 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description linus.kardell 2020-08-21 18:33:24 UTC
If you have a CSV with numbers with dots, Calc will change it into commas

Steps to Reproduce:
1. Open a CSV with number with dots
2. Save it

Actual Results:
Calc changes with dots into commas, and if you save it, it will change them into commas in the file, which is pretty stupid to do in a CSV

Expected Results:
The number format should be preserved.

Reproducible: Always

User Profile Reset: No

OpenGL enabled: Yes

Additional Info:
Build ID: 00(Build:0)
CPU-trådar: 8; Operativsystem: Linux 5.7; UI-rendering: GL; VCL: kf5
Locale: sv-SE (sv_SE.UTF-8); UI: sv-SE
Calc: CL
Comment 1 Eike Rathke 2020-08-21 21:35:35 UTC
Imported numbers and dates are displayed with the formats of the current locale, which for you is Swedish (sv-SE) that uses comma as decimal separator. This is expected and normal behaviour. Saving to CSV uses the locale settings of the cells, which normally is expected by users.

To force a dot decimal separator you can assign number formats of a locale that uses dot as decimal separator, for example English-UK (en-GB), to the data after import. Or before or after import set the overall locale to an English one under Tools -> Options -> Language Settings -> Languages, Locale setting; which switches all display formats' default locale.

However, I agree that when exporting to CSV an optional target locale could be offered to override the cells' number format locale(s).
Comment 2 linus.kardell 2020-08-21 21:44:59 UTC
It should automatically use the same locale for exporting that it used for importing.