Bug 116258 - Severe Bug: Libre Office Calc: csv Import --> correct preview, wrong numbers imported
Summary: Severe Bug: Libre Office Calc: csv Import --> correct preview, wrong numbers ...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.2.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-07 09:07 UTC by kontakt_1
Modified: 2018-03-07 18:33 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
csv to import (69 bytes, application/vnd.ms-excel)
2018-03-07 09:12 UTC, kontakt_1
Details
preview (95.30 KB, image/jpeg)
2018-03-07 09:14 UTC, kontakt_1
Details
imported csv file with errors (34.20 KB, image/jpeg)
2018-03-07 09:14 UTC, kontakt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kontakt_1 2018-03-07 09:07:41 UTC
Description:
Libre Office 6.0.2.1 x64 (and former versions)

Using the 

Steps to Reproduce:
1. open csv (see additional information) 
2. Choose Trennoptionen Semikolon
3. Preview is 100% allright, the second last entry is 0,005
4. This can also be checked by opening the csv with an editor
4. The imported second last value is 5 , this is a dramatic error !

Actual Results:  
see steps to reproduce

Expected Results:
see steps to reproduce


Reproducible: Always


User Profile Reset: No



Additional Info:
imported csv contains:

0;3_1;3_2;-30;30;mV;0;1_1;1_3;-20;20;mA;0;50;100;0.05;0.005;0.00001

line ends with CR an LF


User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:58.0) Gecko/20100101 Firefox/58.0
Comment 1 kontakt_1 2018-03-07 09:12:47 UTC
Created attachment 140417 [details]
csv to import
Comment 2 kontakt_1 2018-03-07 09:14:16 UTC
Created attachment 140418 [details]
preview
Comment 3 kontakt_1 2018-03-07 09:14:54 UTC
Created attachment 140419 [details]
imported csv file with errors
Comment 4 Xavier Van Wijmeersch 2018-03-07 14:35:50 UTC
reproduce with

Version: 5.4.1.2
Build ID: ea7cb86e6eeb2bf3a5af73a8f7777ac570321527
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group

Version: 6.0.1.1
Build ID: SlackBuild for 6.0.1 by Eric Hameleers
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group

Version: 6.0.3.0.0+
Build ID: 45d59e98f4905475648d5e3ccacfa1279eb69a18
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group

but not with

Version: 5.3.8.0.0+
Build ID: 7f1297d9b4f449eb9ada8008fb21b7046d1a8f19
CPU Threads: 8; OS Version: Linux 4.14; UI Render: default; VCL: kde4; Layout Engine: new; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:libreoffice-5-3, Time: 2017-11-10_15:56:34
Locale: nl-BE (en_US.UTF-8); Calc: group

Version: 6.1.0.0.alpha0+
Build ID: ab63510e104c4b8e42982390357af1281c4b11a7
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-03-05_01:01:02
Locale: nl-BE (en_US.UTF-8); Calc: group
Comment 5 V Stuart Foote 2018-03-07 14:37:37 UTC
Can not reproduce on Windows 10 Pro 64-bit en-US with
Version: 6.0.2.1 (x64)
Build ID: f7f06a8f319e4b62f9bc5095aa112a65d2f3ac89
CPU threads: 8; OS: Windows 10.0; UI render: GL; 
Locale: en-US (en_US); Calc: group

The column is imported as 0.005 for this local.
Comment 6 GerardF 2018-03-07 15:35:01 UTC
In DE locale, comma is decimal separator and dot is thousand separator.
so 0.05 is impoted as text 0.05 and 0.005 (3 digits after dot) is imported as 5.

No bug here.
Just choose correct locale or English US column type in import dialog.
Comment 7 kontakt_1 2018-03-07 16:10:48 UTC
(In reply to GerardF from comment #6)
> In DE locale, comma is decimal separator and dot is thousand separator.
> so 0.05 is impoted as text 0.05 and 0.005 (3 digits after dot) is imported
> as 5.
> 
> No bug here.
> Just choose correct locale or English US column type in import dialog.



Ok. the behaviour has something to do with the DE locale.

But your answer did not explain
why 0.05 and 0.00001 gets imported correctly 
(at least looking correctly, even if it is interpreted as text)
and 0.005 becomes read as a number, here as number "5"

In addition to it your answer does not explain why the preview shows the correct numbers.

It still seems pretty buggy to me.

The behaviour is not predictable for the user.
Comment 8 GerardF 2018-03-07 16:42:16 UTC
> Ok. the behaviour has something to do with the DE locale.
> 
> But your answer did not explain
> why 0.05 and 0.00001 gets imported correctly 
> (at least looking correctly, even if it is interpreted as text)
> and 0.005 becomes read as a number, here as number "5"

dots with group(s) of 3 digits are imported as numbers.
Example 123.456 or .005

Without group of 3, example 0.1 or 0.05 it is text.
 
> In addition to it your answer does not explain why the preview shows the
> correct numbers.
> 
> It still seems pretty buggy to me.
> 
> The behaviour is not predictable for the user.

I can agree with this part. Preview should shows text and numbers in the way they will be imported.
Comment 9 m_a_riosv 2018-03-07 18:33:44 UTC
The matter is you can choose the language for the imported file, not for the generated file, choosing English(UK) or English (USA) works properly they have dot as decimal separator, but which depends if there are dates.
The preview shows how data are taken to columns in different fields, but not the final format.
I think not a bug.
Sure there is room for improvement, but please better in a new bug report, as request for enhancement.