| Summary: | CSV import improperly import floats as text prefixed by a hidden apostrophe | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Martin Mokrejs <mmokrejs> |
| Component: | Calc | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | CC: | ilmari.lauhakangas |
| Priority: | medium | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Crash report or crash signature: | Regression By: | ||
|
Description
Martin Mokrejs
2023-06-15 09:18:13 UTC
If 0.65 appeared in a CSV, and got imported as text, and shows '0.65 in the edit line, all this means: 1. That the locale defined in the import dialog uses comma as decimal separator; 2. And that the locale set in your spreadsheet cells uses dot as decimal separator. In essence, it is a user error of not setting the CSV import settings properly in the dialog, and not a bug. Of course, it's just an educated guess, in the absence of a sample CSV. You should either set the locale in the import dialog to e.g. en-US (if all the data in the CSV uses those conventions), or you may select "USA" per-column there in the dialog, if the data happens to be mixed. And for converting text to numeric (or date(+time)) after import see https://wiki.documentfoundation.org/Faq/Calc/How_to_convert_number_text_to_numeric_data (In reply to Martin Mokrejs from comment #0) > Yes, the thousands separator ',' got interpreted regardles of my locale as a > decimal dot so 12,600 (twelve thousand 6 hundred) turned into 12,6. But that > is another story. > Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US That pretty much suggest that the CSV import locale probably was also cs-CZ which has ',' comma decimal separator. Pay attention to the dialog and its settings. The purpose of a csv-import-DIALOG is NOT to press the "ok" button as soon as possible, but to choose the IMPORT options carefully!! |