File opens in Writer instead of Calc

The name all uppercase with “~F” suggests it is a very old file coming from DOS or old W$. This was the 8+3 convention at this time. It could then be encoded as some code page xxx, not Unicode. This could disturb LO. Use a text editor to convert to Unicode (under a different name to avoid the ~).

1 Like

Do you know of a way to do that? The instructions I’m seeing are telling me that I should be able to edit the settings while Saving As, but that box is greyed out.

As I told you, I have no experience with W$. My favourite text editor under Linux allows me to choose the character set under which the file should be encoded. I have a menu Tools>Encoding>various_families>specific_character_set. See if you have something similar. Anyway, the character set must be chosen before saving.

@SteveS801 , you might be able to do that with Notepad.

Writer: Select SaveAs first, then change file format from .odt to “Text - select charset” (or similiar wording). This it not the first entry fir text in the list. You will then be asked for the charset.

I don’t see how codepage/encoding could be relevant here…

Ah, but it is. I did exactly that: copy/paste, saved as a txt and renamed into srt and it opens as expected. The question I have is why tho? Obviously, I know what to do next time I run into the issue, but can’t it just open with the program I tell it to?

Thank you for the help, this worked.

When you open any file using Calc executable - i.e., using C:\Program Files\LibreOffice\program\scalc.exe, - the resulting command line used to open the file will include --calc parameter. This would tell LibreOffice to prefer Calc filters when opening it.

First thing to check in your case is if the file is really associated with the mentioned executable, and not to generic soffice.exe. Don’t trust the icon, it could be anything, including cached image.

  1. Make sure you do not have LibreOffice running, including QuickLaunch. Open Windows Task Manager, and check that there is no soffice processes on the Details tab.
  2. In the Task Manager, enable Command line column: right-click on any column on the Details tab, click on Select columns context menu item, and in the dialog, make sure Command line is checked.

image

  1. Double-click a SRT file, and when it opens, open the Task Manager’s Details tab again, and see what command line is shown for a soffice process: in case your SRT is associated with Calc, the command line would start with a path to scalc.exe, and also there will be --calc parameter somewhere in the end of the command line.

If there is no mentions of calc in the command line, it means that your manual association was somehow modified. Re-associate your SRTs to Calc again manually.

You may also inspect Windows Registry, to check if the association is correct. The Registry path is HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.SRT\UserChoice, and it should refer to scalc.exe:

3 Likes

Interesting, after re-associating the file with scalc, just to be sure, then checking the key you provided, there was no change in the value:
Screenshot 2023-05-22 080152
Is the same before, and after. I’m assuming I should manually edit the value and all would be right with the world?

You could also look for the srt_auto_file in the registry, and try to see what it has. MS changes the way how it registers file associations often; the *_auto_file was a great new thing at some point in the past (and it used HKCU registry hive to override the system-wide associations in HKCR); maybe it’s in use again in, say, Windows 11 (I have 10), or it may be used in some association scenarios / on Thursdays / whatever … :slight_smile:

Thanks,


Is this what I’m looking for?

Yes, and it seems fine.
But what does your commend line inspection shows, using the Task Manager? Is --calc there in the command line when you launch an SRT?

Yes, and it still opened in Writer.


That most assuredly is not calc.

Yes; and it means that either the file cannot be recognized by any Calc filters, or that your installation/profile is corrupt. I’d try to clean the profile first. And provide a sample SRT (rename it to, say, ODT, to please the site engine, that would not allow files having extensions other than an allowed set).

It was definitely the encoding. Wanderer’s solution of Saving As worked. It was encoded as
Screenshot 2023-05-22 082723

And thank you for the help

:slight_smile: No, it wasn’t “encoding” (any plain text file with any encoding would fit Calc’s Text filter), but rather a file format - it looks like you managed to save it as a Writer file (OpenDocument?) previously, using the old extension (which prevented all Calc filters, of course). The important bit is - what did the Save As dialog suggesting you before you changed that to Text (Encoded) as @Wanderer suggested.

But anyway, nice that you figured it! Thanks @ajlittoz and @Wanderer.

The before encoding was the screenshot here. It was saved as an srt, I saved as a txt with unicode utf-8, then changed the extension to an srt and it opened normally.

Duplicate of Open html File in Calc from OS

1 Like

Not quite. It’s close, but not a duplicate. The questions are similar, yes, but my question is that I already have set the scalc to open, not the soffice, yet it still opens Writer.