Bug 40223 - FILEOPEN FILESAVE - Recognize .tsv extension for tab-separated value files
Summary: FILEOPEN FILESAVE - Recognize .tsv extension for tab-separated value files
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.4.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-19 03:39 UTC by Tristan Miller
Modified: 2014-10-22 06:37 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tristan Miller 2011-08-19 03:39:23 UTC
It is not uncommon for people and programs to produce files which .tsv extensions for tab-delimited text files.  When opening and saving, LibreOffice Calc should recognize this extension as referring to what it calls "Text CSV" files; currently it does not:

Steps to reproduce (saving):
1. Create a spreadsheet
2. File->Save As
3. Name: foo.tsv
4. Format->Text CSV
5. Edit filter settings: Checked
6. Field delimiter->Tab
7. OK

Observed behaviour:
8. The file was saved as foo.tsv.csv.

Expected behaviour:
8. The file should have been saved as foo.tsv.


Steps to reproduce (opening):
1. Assume there exists a tab-separated value file foo.tsv
2. In Calc, File->Open
3. Select the foo.tsv file
4. Open

Observed behaviour:
5. foo.tsv is opened as a text file in Writer.

Expected behaviour:
5. foo.tsv should have been opened as a spreadsheet in Calc.


This bug also affects OpenOffice.Org; see their Bug 69830: https://openoffice.org/bugzilla/show_bug.cgi?id=69830
Comment 1 Jeffrey 2011-08-20 06:42:13 UTC
Saving Bug confirmed for LibreOffice 3.4  340m1(Build:103) on OpenSuse Linux.
Comment 2 Björn Michaelsen 2011-12-23 12:37:52 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 3 sasha.libreoffice 2012-01-31 07:53:28 UTC
to solve this problem, do Tools->Options LibreOffice->general->Open/Save dialogs "Use LibreOffice dialogs" and check it
Then when saving, uncheck "Automatic file name extension"

And I agree that add TSV to file format makes sense, it will be more handy to save tables.
Comment 4 Tristan Miller 2012-07-05 04:02:49 UTC
sasha.libreoffice@gmail.com, that isn't a solution to the problem generally as it prevents LibreOffice from (correctly) adding automatic file name extensions for other file types.  ".tsv" needs to be recognized by LibreOffice as a valid extension for the so-called "Text CSV" format (which is a poor choice of name in any case).
Comment 5 Tristan Miller 2012-07-05 04:04:10 UTC
Saving bug confirmed for LibreOffice 3.5.4.2 350m1(Build:2) on Ubuntu 10.04.
Comment 6 Tristan Miller 2012-08-15 19:11:10 UTC
Tested again in LibreOffice 3.6.0.4; performance is much better now, but could still use some work:

1) When opening .tsv files, LibreOffice now correctly brings up the Text Import dialog in Calc.  However, the default field delimiter is set to "Comma".  Please change this default to "Tab".

2) When saving files as "Text CSV", it's possible to specify a ".tsv" extension, and Calc won't silently append an extra ".csv" extension.  However, a couple labels in the UI still imply that ".csv" is the only correct extension for this file type:

a) The label for the "Automatically select filename extension" checkbox currently has "(.csv)" at the end of it. Perhaps this parenthetical comment could be removed, or changed to "(.csv/.tsv)" or some other string which recognizes that two different extensions are possible.

b) The name of the file type in the "Filter" drop-down box still reads "Text CSV (.csv)".  This is misleading, since the format is actually a delimited text file with arbitrary delimiters.  Perhaps this could be changed to "Text" or "Delimited text".  The parenthetical comment should also be removed or revised as above.
Comment 7 Buovjaga 2014-10-22 06:37:25 UTC
(In reply to Tristan Miller from comment #6)
> Tested again in LibreOffice 3.6.0.4; performance is much better now, but
> could still use some work:
> 
> 1) When opening .tsv files, LibreOffice now correctly brings up the Text
> Import dialog in Calc.  However, the default field delimiter is set to
> "Comma".  Please change this default to "Tab".

It defaults to "Tab" now. Please open new enhancement bugs, if you want to suggest more improvements. Version: 4.4.0.0.alpha1+
Build ID: a8c24b25fd9fb21097a08a22797bf61b59099ea1
TinderBox: Win-x86@39, Branch:master, Time: 2014-10-21_06:33:33