We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question
0

Is there a command to open a file in Calc? [closed]

asked 2020-08-21 23:44:55 +0200

smurf gravatar image

updated 2021-05-18 12:14:10 +0200

Alex Kemp gravatar image

On a Mac, I can use an AppleScript to open a file in Excel. LibreOffice doesn't seem to have an AppleScript dictionary. Is there some other way (maybe from the command line?) that I can tell LibreOffice to open a file, using Calc in particular? (The file is tab-delimited text, so if left to its own devices, LibreOffice would open it in Writer, which would not suit my needs.)

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by smurf
close date 2020-08-26 23:28:23.334665

1 Answer

Sort by » oldest newest most voted
1

answered 2020-08-22 00:31:47 +0200

erAck gravatar image

If you rename the file with file name extension .tsv (Tab Separated Values) it is automatically opened in Calc. Also if you open a .txt file while a Calc spreadsheet document is open it is opened in Calc. From command line you could use the --calc option, so soffice --calc filename.txt should open it in Calc as well. But I don't know if and how that works on a Mac.

edit flag offensive delete link more

Comments

This is very helpful, thank you.

In case anyone else is wondering about this--On a Mac, you can make LibreOffice the default app for documents of type .tsv, and then use open /path/document.tsv from the command line. That brings LibreOffice to the front, with the normal import dialog for Calc.

smurf gravatar imagesmurf ( 2020-08-26 23:26:40 +0200 )edit

Question Tools

1 follower

Stats

Asked: 2020-08-21 23:44:55 +0200

Seen: 277 times

Last updated: Aug 22 '20