DocumentServer
DocumentServer copied to clipboard
Cannot open a .tsv file
Do you want to request a feature or report a bug? Bug
What is the current behavior? If you open a .tsv file the message "File format is not supported" shows but when I open a .csv file the default delimiter option is tabulator....
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
- start the programm
- open a tsv file
What is the expected behavior? The same as the current behaviour when you open a csv file. And if you open a CSV, a Comma Seperated Value file, the default delimiter should be comma or more options, like LibreOffice.
Which versions of DesktopEditors, and which OS are affected by this issue? Did this work in previous versions of DesktopEditors? 5.6.4.20
Hello, @Xyz00777. Thank you for report. I create new issue 47231 in our private issue tracker.
This issue actual in Document Server.
Moving this issue to DocumentServer repo, since it's our base product and problem actual there too
FYI: It's possible to open TSV (Tab-separated values) file, by changing the file extension to .csv
(as a Comma-separated values file). OnlyOffice then allows opening the file and asks about separator, where Tab can be selected and the file is correctly opened.
However note that saving the file will result in conversion to CSV, i.e. comma-separated values file.
Btw., the extension .csv
can also generally mean "character separated values", so you don't need a different file extension for tabs.
Interesting, I've never heard about this meaning of the .csv
extension, but it seems you're right. However with plain text files, the file extensions are more of a convention than a requirement. For instance, LibreOffice lets me open .txt
files in Calc by default, expecting a .csv
formatted file.
Is there any progress on this?
Let me summarize:
- OnlyOffice has a strong aversion towards the TSV extension. [^1]
- OnlyOffice can open TSV files (if you rename them).
Since other office suits accept TSV as valid file extension, I think it would be appropriate for OO to also accept it. Especially since it has no problem opening the underlying format. Edit: Saving the TSV file without conversion to CSV would also be nice to have.
[^1]: OO hates TSV extension to the point that it freezes if I try to drag-n-drop a TSV file onto an OO window. Killing the app and renaming the file to CSV shows no such issue. FWIW I installed OO as a flatpak on Ubuntu.
so you don't need a different file extension for tabs.
I guess I don't need it, but it's really convenient for me to have it. I use commandline like all the time, as a scientist. This is why I use plain-text spreadsheets so much in the first place. I need to load them to R
or extract something with awk
et al on a daily basis. In the majority of scenarios TSVs are more easy to work with for me than CSVs and I use the extension to inform me up front which format am I facing at the moment. Renaming all my files to CSV would be quite a downgrade for my workflow and an extra burden for my brain to worry about. Less trial-and-error cycles, which I have plenty of already in my job.
Those are my 2cents.
Is there anything that can be done to move this forward?
All we need here is that files with the TSV extension are treated exactly as CSV files - i.e. open with dialog to select encoding and separator. At most you could change the preselected separator, but even without it the experience would be a massive improvement over the current behaviour (i.e. a show-stopping error in my face).
These are plain text files, nothing complicated. In fact, Libre Office [^1] lets me open any plaintext file in Calc (their spreadsheet app), no matter the extension. Simply because many other plaintext formats are just a fancier version of TSV or CSV (e.g. some 70% of formats in bioinformatics are just plain TSV with fancy headers) - but renaming VCF or SAM or BED or GFF all to CSV will help nobody. Same for TSV. So why pretend that the issue is complicated - the only related complicated thing is standards-compliant CSV with quotes, which is already supported. Also plain TSV is already supported.
The only thing really broken here is that a .tsv
at the end of my file name will break all hell loose, for no good reason.
[^1]: I don't use Libre Office, because it's very tedious to use, thanks to the decades of design baggage (both codebase and interface). Currently, OnlyOffice - on desktop anyway - is my only office (excuse the pun). That means I don't consider Libre Office a good "workaround".
@janxkoci, Sorry I'm just a QA specialist, I'm not in a position to guarantee any estimates. You better contact [email protected].
Is there anything that can be done to move this forward?
I'm not sure, if I'm right, but it's highly probable, that addition of <10 lines of code in https://github.com/ONLYOFFICE/core/ repository may be enough to solve the issue. I'll try to build OnlyOffice in it's current state from source, and if I succeed I'll try to add the changes to make it succeed in loading tsv files.
If it will work I can try making a commit, which may be merged, but currently I do not really understand how the code is structured here, so I have no idea, if it's really that simple. Anyway it's weird how it didn't get fixed in the recent 2 years.
EDIT: I'm failing to even compile the oryginal source code - I do get errors with both gcc and clang using official compilation script, so I probably won't be able to fix it anytime soon. I am not even sure I won't just give up on trying to fix the issue soon.
In the meantime, I also noticed that I can open the files just fine from the Data tab in ribbon, using the get data from local CSV/TXT file, then filtering to all file types in the dialog and selecting e.g. a TSV file. After that there is even a nice preview to check your separator etc, which is very nice and should be in the default open CSV dialog as well IMHO (other users asked for this exact feature here on github too).
This is still happening :) Hoping for a fix before long; it really just needs to open tsv files with the existing csv code as far as i can tell.
In the meantime, I also noticed that I can open the files just fine from the Data tab in ribbon, using the get data from local CSV/TXT file, then filtering to all file types in the dialog and selecting e.g. a TSV file. After that there is even a nice preview to check your separator etc, which is very nice and should be in the default open CSV dialog as well IMHO (other users asked for this exact feature here on github too).
Is there a way to force OnlyOffice to just use this as the default way to read datafiles? It is much more convenient than that regular view of opening files, and combine that with being able to open any text-file and only using the extension to guess the delimiter would be amazing!