Bug 101415 - FILESAVE FILEOPEN CSV linebreaks in LINUX
Summary: FILESAVE FILEOPEN CSV linebreaks in LINUX
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.5.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-09 22:39 UTC by Andreas Scholz
Modified: 2017-03-28 08:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot Textimport (35.48 KB, image/png)
2016-08-13 21:06 UTC, Andreas Scholz
Details
Test File 1 (49 bytes, text/comma-separated-values)
2016-08-24 20:20 UTC, Andreas Scholz
Details
Test File 2 (49 bytes, text/comma-separated-values)
2016-08-24 20:22 UTC, Andreas Scholz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Scholz 2016-08-09 22:39:19 UTC
The export to and the import from csv files works fine in Windows. Also when text in cells contain a LF as an "internal linebreak", because Windows recognizes CR/LF as end of line. But in Linux with only LF at the end of line comes the problem. There is no difference to the "cell-internal-linebreak". Such a spreadsheet is completely jumbled after re-importing.

I think it would be nice to have an option to configure the linebreaks both in the export- and the import filter in future releases.

If already now there would be an option to configure this, I would be glad to know where to find it. I didn't find yet...

I tried Calligra Sheets. It has the option in the export filter but not in import so it's not an alternative.

Thanks a lot!
Comment 1 Buovjaga 2016-08-12 18:02:46 UTC
Could you include a problematic example file?

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 2 Andreas Scholz 2016-08-13 21:06:42 UTC
Created attachment 126820 [details]
Screenshot Textimport
Comment 3 Andreas Scholz 2016-08-13 21:07:35 UTC
Sorry, first I should say, that the main reason for my posting of this report was more a feature request than a bug report.

I thought the reason for my problem were the different linebreaks in Windows and Linux. They aren't, as I know now. I didn't recognize the problem on my old Windows machine yet. But while creating the testfile for this report, I tried it on both machines with the same result. My fault was the wrong setting of the text delimiter (single or double quotes).

But it seems, as there is another problem. LO stores the last settings in the textimport window. That's nice and should remain this way. But the preview sometimes shows a wrong result. I created 2 almost identical csv-files. One with single quotes as text delimiter, one with double quotes. Field delimiter of both is semicolon.

Content of the file "text_delimiter_double_quote.csv":
"CellA1_line1[LF]CellA1_line2";CellB1[LF]
CellA2;CellB2[LF]

The other file similar, but with single quotes.

I opened both alternating. For example with the former setting to single quotes I opened the file with the double quotes. The preview in the textimport window was wrong. It showed the decided import but the cell A1 became broken. See the attached screenshot. Now as I know this, I can work around it by clicking any setting so the preview shows what I'll get.

Anyway - my real problem is, that a certain program I use makes csv-outputs with not correct text delimiters. In this case, I think, a new option of setting the various linebreaks could be helpful.
Comment 4 Buovjaga 2016-08-14 11:22:42 UTC
Which LibreOffice version are you using?
Comment 5 Andreas Scholz 2016-08-14 19:53:14 UTC
On the Linux machine (Mint 17.3 64bit): LO 5.1.5.2
On the Windows machine (W7pro 32bit): LO 4.1.4.2

Also LO 4 shows the same behavior regarding the preview as descibed.
Comment 6 Jean-Baptiste Faure 2016-08-24 04:42:46 UTC
Please, attach your test file.

Best regards. JBF
Comment 7 Andreas Scholz 2016-08-24 20:20:08 UTC
Created attachment 127007 [details]
Test File 1
Comment 8 Andreas Scholz 2016-08-24 20:22:01 UTC
Created attachment 127008 [details]
Test File 2
Comment 9 Jean-Baptiste Faure 2016-08-27 07:38:49 UTC
I think there is no problem with linebreak. You only have to pay attention to your choice of text separator. If you choose the appropriate one, import is correct.
What is your workflow with your csv files? Do you have the ability to check the text delimiter for each file?
Instead of changing LO, maybe it is easier to make a pre-processor script which changes the text delimiter in each csv file.

Best regards. JBF
Comment 10 QA Administrators 2017-03-01 10:40:53 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2017-03-28 08:12:54 UTC Comment hidden (obsolete)