Bug 70111 - CSV files to keep the original text delimiters and separators
Summary: CSV files to keep the original text delimiters and separators
Status: RESOLVED DUPLICATE of bug 152336
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:
: 71376 101173 (view as bug list)
Depends on:
Blocks: CSV
  Show dependency treegraph
 
Reported: 2013-10-04 04:56 UTC by oliver nadj
Modified: 2022-12-01 09:50 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Calc's 'Text Import' dialog with field separator setting for filtered import of CSV, and reused at export (24.29 KB, image/png)
2021-05-03 13:02 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description oliver nadj 2013-10-04 04:56:15 UTC
I think it would be useful if Spreadsheet editor can keep the original text delimiters and separators of CSV documents.

It is a related to this question: http://ask.libreoffice.org/en/question/23332/csv-files-lose-formatting-after-save/

People use CSV files to import/export records from different apps and hardware. These tools often do not prepared to handle different kind of formatting. I know it is possible with additional "Save As" steps but it is not user-friendly.
Comment 1 Pedro 2013-10-04 10:28:06 UTC
I agree that the default should be to keep the same field and text delimiters. If the user wants to change then it should be his/hers *option*, not a software decision.
Comment 2 Maxim Monastirsky 2013-11-08 08:16:32 UTC
*** Bug 71376 has been marked as a duplicate of this bug. ***
Comment 3 Urmas 2015-04-25 10:18:00 UTC
Files saved in this way become corrupted, so that is not just an 'enhancement'.
Comment 4 m_a_riosv 2016-07-28 22:27:57 UTC
*** Bug 101173 has been marked as a duplicate of this bug. ***
Comment 5 QA Administrators 2018-07-21 02:40:33 UTC Comment hidden (obsolete)
Comment 6 aljosha.papsch 2018-07-30 10:58:58 UTC
Yes, the issue persists to this day.

Version: 6.0.5.2
Build-ID: 6.0.5-1
CPU-Threads: 4; BS: Linux 4.17; UI-Render: Standard; VCL: gtk3; 
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group

Steps to reproduce:

1. Create a file test.csv with the contents:

foo;bar

2. Open the file in Calc, leaving the import settings untoched.
3. Write "baz" in A2, "quux" in B2.
4. Choose File | Save and confirm CSV format.

Expected file contents:

foo;bar
baz;quux

Actual file contents:

foo,bar
baz,quux
Comment 7 QA Administrators 2019-07-31 02:53:51 UTC Comment hidden (obsolete)
Comment 8 sam tygier 2020-08-06 08:12:27 UTC
This is fixed. I can't reproduce the problem following the instructions in comment 6.

I think it was fixed in LO 5.4 by the patch for #55236 which saves the formatting settings from the open dialog.
Comment 9 Xisco Faulí 2021-05-03 11:34:25 UTC
(In reply to aljosha.papsch from comment #6)
> Yes, the issue persists to this day.
> 
> Version: 6.0.5.2
> Build-ID: 6.0.5-1
> CPU-Threads: 4; BS: Linux 4.17; UI-Render: Standard; VCL: gtk3; 
> Gebietsschema: de-DE (de_DE.UTF-8); Calc: group
> 
> Steps to reproduce:
> 
> 1. Create a file test.csv with the contents:
> 
> foo;bar
> 
> 2. Open the file in Calc, leaving the import settings untoched.
> 3. Write "baz" in A2, "quux" in B2.
> 4. Choose File | Save and confirm CSV format.
> 
> Expected file contents:
> 
> foo;bar
> baz;quux
> 
> Actual file contents:
> 
> foo,bar
> baz,quux

Still reproducible in

Version: 7.1.4.0.0+ / LibreOffice Community
Build ID: 06d5d625e1dc8489e51b962353ac423669e61fed
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 10 V Stuart Foote 2021-05-03 13:02:28 UTC
Created attachment 171606 [details]
Calc's 'Text Import' dialog with field separator setting for filtered import of CSV, and reused at export

(In reply to Xisco Faulí from comment #9)
> (In reply to aljosha.papsch from comment #6)
> > Yes, the issue persists to this day.
> > 
> > Version: 6.0.5.2
> > Build-ID: 6.0.5-1
> > CPU-Threads: 4; BS: Linux 4.17; UI-Render: Standard; VCL: gtk3; 
> > Gebietsschema: de-DE (de_DE.UTF-8); Calc: group
> > 
> > Steps to reproduce:
> > 
> > 1. Create a file test.csv with the contents:
> > 
> > foo;bar
> > 
> > 2. Open the file in Calc, leaving the import settings untoched.
> > 3. Write "baz" in A2, "quux" in B2.
> > 4. Choose File | Save and confirm CSV format.
> > 
> > Expected file contents:
> > 
> > foo;bar
> > baz;quux
> > 
> > Actual file contents:
> > 
> > foo,bar
> > baz,quux
> 
> Still reproducible in
> 
> Version: 7.1.4.0.0+ / LibreOffice Community
> Build ID: 06d5d625e1dc8489e51b962353ac423669e61fed
> CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
> Locale: en-US (en_US.UTF-8); UI: en-US
> Calc: threaded

Xisco, please rethink. When I take the simple step of setting values (i.e. removing undesired separators) from the 'Text Import' dialog--the format is retained on export save back to .CSV

It is an export filter action, not a native format, of a document that has been taken through import filters.

Setting a format on import (here removing <Tab> & <Comma>), that is then maintained for the export, is a reasonable accomodation. And a requirement justifiable for reasonable workflows.

CSV are not native formats, we don't "edit" CSV.
Comment 11 Mike Kaganski 2022-08-31 06:20:23 UTC
So:

1. Originally, this was a duplicate of bug 55236. This is resolved.
2. Since comment 6, new issue got discussed, with "leaving the import settings untoched" piece being the main culprit, and the user error being expecting that when you keep several separators enabled on import, the export will guess the correct one automatically.

Closing this as a duplicate of the older bug; id needed, a UX problem arising from several separators used on import might be considered in a separate issue (one intrusive way could be, e.g., to have a warning on save when such settings are remembered).

*** This bug has been marked as a duplicate of bug 55236 ***
Comment 12 Mike Kaganski 2022-12-01 09:50:22 UTC

*** This bug has been marked as a duplicate of bug 152336 ***