Bug 141155 - FILEOPEN: CSV file ignoring enclosing chars
Summary: FILEOPEN: CSV file ignoring enclosing chars
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CSV-Import
  Show dependency treegraph
 
Reported: 2021-03-22 01:39 UTC by Abhay Dandekar
Modified: 2021-04-09 07:21 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Combined pic (85.95 KB, image/png)
2021-03-22 01:39 UTC, Abhay Dandekar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Abhay Dandekar 2021-03-22 01:39:28 UTC
Created attachment 170615 [details]
Combined pic

Hi All,

I have a CSV with comma in data. The data is correctly enclosed with double-quotes.

CSV data is :

"This is a single, cell"


While importing a CSV file with enclosing chars, the preview shows the data correctly. Shown in pic_import_preview.png

But after the calc opens, it puts the data in two different cells. Shown in 
pic_open_calc.png

This is major, because once a user opens such a file and accidentaly saves it, calc adds an additional comma separator whereever the data is not with commas. i.e a new column gets added in the CSV file. This will lead to data error for all the downstream applications which are not expecting those columns.


Below are the version details:

Libreoffice calc
Version: 6.4.6.2
Build ID: 1:6.4.6-0ubuntu0.20.04.1
CPU threads: 12; OS: Linux 5.8; UI render: default; VCL: gtk3; 
Locale: en-IN (en_IN); UI-Language: en-US
Calc: threaded


~Abhay D
Comment 1 m_a_riosv 2021-03-22 08:55:47 UTC
You have not marked the option 'Format quoted filed as text'
Comment 2 Abhay Dandekar 2021-03-23 02:47:21 UTC
Hi,

Thanks for your response.

Even selecting Option 'Format quoted field as text' does not have any impact.

Expectation is, since the data ( "This is a single, cell" ) has comma in double-quotes, it should land in a single cell.

Even if I select 'Format quoted field as text' as true, it still lands in two cells.

~ Abhay D
Comment 3 Abhay Dandekar 2021-04-06 06:56:21 UTC
Can someone please update the importance to critical. This is because, once a user opens a CSV file with comma in data, and saves it, the entire CSV file gets corrupted. 

This is the dataloss situation and hence upped the importance for this issue.

Thanks,
~Abhay D
Comment 4 m_a_riosv 2021-04-06 16:48:34 UTC
Reviewing your pic, you have not selected and string delimiter, with it works fine for me.

And please don't set up your bugs as NEW, someone else must do it.
Comment 5 Abhay Dandekar 2021-04-09 05:29:53 UTC
Yes, you are correct. 

Setting up the String Delimiter resolved the issue for me.

Closing this issue as resolved.
Comment 6 Timur 2021-04-09 07:21:16 UTC
Wfm is when there was a bug, see Status, here is NotABug.