Bug 116314 - csv import
Summary: csv import
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.2.1 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-09 13:47 UTC by Christian Weiss
Modified: 2018-03-09 16:09 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
csv file with the correct numbers (92.30 KB, text/plain)
2018-03-09 13:49 UTC, Christian Weiss
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Weiss 2018-03-09 13:47:21 UTC
Description:
Hello!

I'm importing a csv file in Libreoffice 6.0.2.1 on Windows 64Bit.
the following line, endofline with "\n"...

13864020092289,"Basigi",-78.21875,-53.59375,-89.875

the last number is imported as -89875

If I put all numbers in double quotes and tell him to import all in double quotes as string, it is imported the right way.

The same with:

5068196160921,"Beni",-62.96875,144.65625,-33.375      (imported: -33375)
6406044422890,"Boveltibes",-7.25,49.9375,109.625      (imported: 109625)
16065459201489,"Caereda",106.8125,-65.25,105.375      (imported: 105375)

and even more....

Bye, Christian



Steps to Reproduce:
1. create csv with the told lines
2. use import "csv" of calc
3. see last number of line in calc

other numbers a re imported with the "."

Actual Results:  
Some numbers imported without the included "."

Expected Results:
all numbers having a "." imported with the "." in the right place


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0.4 Waterfox/56.0.4
Comment 1 Christian Weiss 2018-03-09 13:49:22 UTC
Created attachment 140503 [details]
csv file with the correct numbers

id and coordinates of star systems from E:D (Elite Dangerous, a Game)
Comment 2 m_a_riosv 2018-03-09 14:39:57 UTC
What language have you select on the import?
Comment 3 Christian Weiss 2018-03-09 15:01:41 UTC
(In reply to m.a.riosv from comment #2)
> What language have you select on the import?

That which are given by standart:
"Zeichensatz" is UTF-8
"Sprache" is Standart - Deutsch (Deutschland)
"Trennoption" is Komma
"Zeichenketten-Trenner" is "
"Weitere Optionen" is "Werte in Hochkomma als Text formatieren"

Sorry, I use the german version, I don't know the english word for the options.

Bye, Christian
Comment 4 m_a_riosv 2018-03-09 15:38:12 UTC
If I'm not wrong, decimal separator in Deutsch is comma, while csv uses dot.

The language is for the csv imported file, so depends on the dates, use English(UK) or English(USA), or whatever language with dot as decimal separator.
There is another option clicking on column(s) head and selecting the column type properly US (English).

With English (UK) works fine for me with your attached file.
Comment 5 Christian Weiss 2018-03-09 15:44:49 UTC
(In reply to m.a.riosv from comment #4)
> If I'm not wrong, decimal separator in Deutsch is comma, while csv uses dot.
> 
> The language is for the csv imported file, so depends on the dates, use
> English(UK) or English(USA), or whatever language with dot as decimal
> separator.
> There is another option clicking on column(s) head and selecting the column
> type properly US (English).
> 
> With English (UK) works fine for me with your attached file.

Than: Why is it only the number at the end and all other numbers in that line are imported correct? If german is the problem, than all numbers should be imported by deleting the "." (= as 1k separator) and none of my numbers should have a decimal separation.

That is why I opened a bug report, I think, that behavior is not correct.

I know: The decimal separator in German is "," and the 1k separator is "." (oposit to other languages).

Bye, Christian
Comment 6 m_a_riosv 2018-03-09 16:09:15 UTC
(In reply to Christian Weiss from comment #5)
> (In reply to m.a.riosv from comment #4)
> ...
> Than: Why is it only the number at the end and all other numbers in that
> line are imported correct? If german is the problem, than all numbers should
> be imported by deleting the "." (= as 1k separator) and none of my numbers
> should have a decimal separation.

With German as language, numbers with dot are imported as text not as numbers (they are aligned to the left not to the right). And in those number with just three decimal places the dot is taken as thousand separator, has no meaning interpreter as such with two decimals.
> 
> That is why I opened a bug report, I think, that behavior is not correct.
So seems the behavior is correct.
> 
> I know: The decimal separator in German is "," and the 1k separator is "."
> (oposit to other languages).
No oposit, there are other languages with the same separators like Spanish.