CALC Saving my TSV file as a CSV without asking

Create a tab-separated file saved as test.txt.
Open in text editor and save:

1	2	3	4
This	is	a	test

(Those are tabs)

  1. Open it with Libreoffice Calc
  2. Click “Save”
  3. Libreoffice asks “Are you sure you don’t want to save as ODS?” or like
  4. Click “Use text csv format”

Open test.txt file in Text editor:

1,2,3,4
This,is,a,test

This is UNACCEPTABLE behavior that I would like to know how to stop. The file was a TSV, I did not specify to change it into a CSV. Libreoffice should KEEP my original format setting.

Note: Previous versions did (I’m pretty sure) since this is part of a workflow I’ve been using for years (since before the OO / LO schism)

  • OS: Ubuntu 16.04
  • LO: 5.1.4.2

Already answered here: How to generate Calc tab delimited output?

1 Like

This happens when Calc does not really know which separator to use on save. Why? Because the user didn’t specify that on opening.

The text import dialog allows to choose field separators for the opened file. By default, three of them are selected: tab, comma, and semicolon.

When user does not change this default, any of these unescaped characters in the file would start a new field. But then, Calc would use one of these characters on save, not all three - and it happens that comma is the first choice in this situation.

Just select one correct separator, and Calc will correctly store this information with the opened file, using this selected separator on save. It worked with version 5.1, it works the same way now with 7.4.

Note that Calc does not really analyze the document to check which of the selected separators it actually encountered. Doing this could help it to filter out the unused ones, and select the correct one on opening; filed as tdf#152336.