Bug 120796 - Attempting to open a ".txt" file with Calc selected from Windows explorer "Open with", opens Writer instead
Summary: Attempting to open a ".txt" file with Calc selected from Windows explorer "Op...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.6.2 release
Hardware: All Windows (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: notBibisectable, regression
: 120944 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-10-22 15:00 UTC by taw
Modified: 2022-10-01 08:12 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 taw 2018-10-22 15:00:29 UTC
Description:
In Windows 10, I right-click on a ".txt" file, choose "Open with", then select "Choose another app", then pick "LibreOffice Calc".  This brings up Writer and loads in the file, whereas I wanted to convert and read the file into a spreadsheet.

Steps to Reproduce:
1. right-click on a ".txt" file
2. choose "Open with"
3. select "Choose another app"
4. pick "LibreOffice Calc"

Actual Results:
Writer is opened and loads in the file

Expected Results:
Calc opens and provides options for which column separators to use


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Buovjaga 2018-10-26 19:09:57 UTC
*** Bug 120944 has been marked as a duplicate of this bug. ***
Comment 2 Buovjaga 2018-10-26 19:11:34 UTC
I am finding this hard to bibisect, because pointing to the scalc.exe makes it open just fine in Calc. Same for --calc command line parameter.
Comment 3 Pedro 2018-10-30 18:30:25 UTC
I tried to do it after User Profile reset and it still happened.
Comment 4 Justin L 2019-01-16 12:42:20 UTC
I'll just confirm that I tried this in Linux (Ubuntu 18.04) and did not see the problem - it opened up in Calc. So it probably is Windows only.
Comment 5 Libomark 2019-01-23 00:54:51 UTC
I think this is not a Calc bug.

When I try on my system (Win 7, 64bit 6.0.1.1) I am only offered Libre Office (not  calc).  I suspect the bug lies in the LO UI or installation and the filetype registrations it makes.  Indeed, if you simply open a spreadsheet you will find that soffice is the container application: scalc is no longer visible outside it in Windows.  Use File Open, and click on the All Files *.* dropdown, and you will see that .txt files are defined as writer documents.
Comment 6 Libomark 2019-01-23 01:17:34 UTC
A workaround is simply to rename the file as a .csv

.csv files are regarded as spreadsheet text files: some attempt will be made to parse them.
Comment 7 Pedro 2019-01-23 09:43:46 UTC
There are workarounds.
Not obvious workarounds. It would be good if this behaviour is corrected anyway because forcing users to waste time looking for workarounds is frustrating and they'll just go for the simplest workaround: open the file in Excel.
Comment 8 wdehoog 2019-04-30 13:55:21 UTC
We have the same issue. On windows 7 and 10 using LO 6.1.5.2.

When opening a .BOM files which contain text for one it loads it in Calc and another in Writer. No matter if we specify 'scalc.exe' or 'soffice.exe --calc'.
LO seems to try to detect the file type and overrides our choice.

When opening the file from within Calc it is also opened with Writer.

When we first select the file in the Open Dialog and then select 'Text CSV (*.csv)' as type then it opens the file in Calc (opens the Text Import wizard).
Comment 9 david.cortes.rivera 2019-08-12 11:15:46 UTC
Can confirm that bug is still present with 6.2.5.2 on windows 10.
Comment 10 wingednova 2020-12-17 05:57:13 UTC
Can confirm, reproduced on version: 7.0.3.1 (x64 windows 10)
Comment 11 Buovjaga 2020-12-17 07:02:46 UTC
Changing to notBibisectable because of no known way to use Win explorer integration with bibisect repos
Comment 12 yui 2022-09-12 15:14:24 UTC
Can confirm, reproduced on version: 7.3.5.2 (Ubuntu 22.04.1 LTS)

It could open certain .php files with Calc sometimes
But doesn't work for something.

The two files have the exact same headers. The biggest difference is the size.
Not sure if size matters, just guessing. (the one works is 123.5kb and the one doesn't work is 1.1MB)

Once I change the 1.1MB file's extension to .xls it works just fine.
Comment 13 Pedro 2022-10-01 08:12:35 UTC
This would be good to fix, because plenty of times instead of wanting to open .csv files I want to manipulate .txt files that have the data organized in columns separated by tabs.

These type of .txt files can be generated by a multitude of software including RStudio, which is where I generate .txt files with tabular separators to import to Calc.

Would be nice that there is no assumption about what .txt files are for and to force open them on Writer instead.