Bug 120765 - Importing .csv file ignores some new-line chars
Summary: Importing .csv file ignores some new-line chars
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CSV-Import
  Show dependency treegraph
 
Reported: 2018-10-22 03:40 UTC by Gabriel Staples
Modified: 2019-03-13 19:02 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
csv file demonstrating the buggy import of Row 3, beginning with "J4" (4.03 KB, text/csv)
2018-10-22 03:40 UTC, Gabriel Staples
Details
Text import screen showing the newline char (displayed as an arrow pointing to the left) bug only happens when I have a "String delimiter" of " chosen. (120.78 KB, image/png)
2018-10-22 03:51 UTC, Gabriel Staples
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel Staples 2018-10-22 03:40:39 UTC
Created attachment 145888 [details]
csv file demonstrating the buggy import of Row 3, beginning with "J4"

Open the attached .csv file in a text editor. You'll see that row 3 contains "J4" right up front. If you import it into Calc using only commas as delimiters, however, for some reason it does NOT put this "J4" on row 3 onto a new row. Instead, it appends it to the very end of the preceding row. It seems to be some sort of parsing issue that makes LibreOffice ignore new-line characters in certain instances. Definitely a bug.
Comment 1 Gabriel Staples 2018-10-22 03:51:31 UTC
Created attachment 145889 [details]
Text import screen showing the newline char (displayed as an arrow pointing to the left) bug only happens when I have a "String delimiter" of " chosen.

Text import screen showing the newline char (displayed as an arrow pointing to the left) bug only happens when I have a "String delimiter" of " chosen.
Comment 2 Oliver Brinzing 2018-10-27 08:33:52 UTC
i can confirm this, but IMHO you have to replace all double-quotes 
with pairs of double quotes

from: ,""5.5 2.1 plug male 10""
to:   ,"""5.5 2.1 plug male 10"""

https://stackoverflow.com/questions/43273976/escaping-quotes-and-delimiters-in-csv-files-with-excel/43274459
Comment 3 Xisco Faulí 2019-03-13 19:02:33 UTC
Hello Oliver,
Thanks for the tip.
Closing as RESOLVED NOTABUG