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

Ask Your Question

Open txt files in Calc [closed]

asked 2017-03-24 20:45:19 +0200

ManricoC gravatar image

Dear Ladies & Gents:

I need to be able to open .txt files in Calc. This function is available in OpenOffice [Text CSV (.csv; *.txt)] but not in LibreOffice. The Files I need to open are .txt formatted invoices. With the OO function I can pick the separation option (fixed width, tab, comma, etc.). I went through the Calc functions in LO and I could find only the [Text CSV (.csv)] one. Please help. Thaks, Manrico.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-10-17 08:49:05.237563


Question about "why can't you?" at https://ask.libreoffice.org/en/questi... . These answers are about "what's the workaround".

Jim DeLaHunt gravatar imageJim DeLaHunt ( 2017-10-09 02:09:00 +0200 )edit

4 Answers

Sort by » oldest newest most voted

answered 2017-03-25 09:02:09 +0200

Actually, the function to open txt files as CSV is still there; it's just Open dialog's filter settings were changed. Now, CSV filter here only sees .csv extension. So, a workaround is to open such files in two stages:

  1. Select required file using "All files" or "Text (*.txt)", so that the file name appears in the File Name input box;
  2. Now select the "Text CSV (*.csv)" filter, (the file name stays in the File Name) and click Open.

Another workaround is to create a shell shortcut (.desktop/.lnk) with command line that would explicitly specify module or filter to use. E.g., something like this:

soffice --calc


soffice --infilter="Text - txt - csv (StarCalc)"

If you drag a file (e.g., a TXT) to such a shortcut, LO should open it using selected module/filter, and so make it more convenient to you if that's a repeated task.

Of course, just renaming files to CSV would also help, but that's not a solution, but just another (not always acceptable) workaround.

edit flag offensive delete link more


The workaround to select the required file first, then select the "Text CSV (*.csv)" filter, does not work for me in LibreOffice 5.4.1 or 5.3.4 on Mac OS X. On the Mac application, there is no File Name input box, there is a list box with the file names. I can click on the required file, and that line in the list box is highlighted. But when I select the "Text CSV (*.csv)" filter, LibreOffice clears this selection and greys out any list box row for a file lacking a .csv extension.

Jim DeLaHunt gravatar imageJim DeLaHunt ( 2017-10-09 01:51:06 +0200 )edit

answered 2017-03-24 21:46:49 +0200

karolus gravatar image


This Import-dialog is also available through →Sheet→Insert sheet from file……

edit flag offensive delete link more

answered 2017-03-24 21:29:53 +0200

Zeca gravatar image

updated 2017-03-24 21:32:08 +0200

If I drag and drop the .txt file onto Calc spreadsheet I get the option the separation options menu (fixed width, tab, comma, etc.).

If you cannot do it, upload a dummy .txt file so we can try to do it.

LibreOffice version

edit flag offensive delete link more

answered 2017-10-09 02:13:58 +0200

Jim DeLaHunt gravatar image

Here's the workaround I use with LibreOffice 5.4.1 and 5.3.4 on Mac OS X 10.11.6.

  1. Create a blank spreadsheet, or otherwise arrange to have a spreadsheet as the top document.
  2. File → Open . A file selection dialog appears.
  3. Do not select any File Type. Just click on the tabbed-text file, and click Open. The Text Import dialogue appears.
  4. Select "Tab" for field delimiter, and continue.

Mike Kanagasaki's answer may well work on Linux and/or Windows versions of LibreOffice, but it does not work for me on Mac OS X. This may be a consequence of the standard File Open dialogues having different behaviour on different systems.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-03-24 20:45:19 +0200

Seen: 5,763 times

Last updated: Oct 09 '17