Ask Your Question
0

Import ASCII text file to LibreOffice Calc

asked 2013-02-28 01:57:12 +0200

Tom Irvine gravatar image

updated 2015-07-25 07:27:55 +0200

Alex Kemp gravatar image

I try to import a space or tab-delimited ASCII text file into LibreOffice Calc, but it opens in LibreOffice Writer instead. How can I import the txt file into LibreOffice Calc?

edit retag flag offensive close merge delete

4 Answers

Sort by » oldest newest most voted
1

answered 2015-07-25 02:41:39 +0200

Alex Kemp gravatar image

'CSV' text files ("Comma Separated Values") are classic methods for import/export values for databases, so I thought that there should be a standard import/export method. I was right. The following will work for both Data & Calc, and other characters can be used as the separator (are you still around, Mr Irvine?); it is taken from the Help file:


Opening and Saving Text CSV Files
Comma Separated Values (CSV) is a text file format that you can use to exchange data from a database or a spreadsheet between applications. Each line in a Text CSV file represents a record in the database, or a row in a spreadsheet. Each field in a database record or cell in a spreadsheet row is usually separated by a comma. However, you can use other characters to delimit a field, such as a tabulator character. If the field or cell contains the separator char, the field or cell must be enclosed by single quotes (') or double quotes (").

To Open a Text CSV File in Calc

  1. (menu):File|Open
  2. Locate the CSV file
    If the file has a '.csv' suffix then simply select it, but if it some other extension then you also need to select Text CSV in the File type box
  3. Click Open
  4. In the Text Import dialog, specify the options to divide the text in the file into columns
    The bottom of the dialog previews the layout. Right-click a column in the preview to set the format or to hide the column.
  5. Check the text delimiter box that matches the character used as text delimiter in the file (the defaults are: Tab, Comma + Semicolon). In case of an unlisted delimiter, type the character into the input box.
  6. Click OK when complete.

If this helps then please tick the answer (✔).

edit flag offensive delete link more
1

answered 2013-02-28 02:41:15 +0200

horst gravatar image

If your file has the extension .txt it is by default recogized as a text file and opened in writer. You can rename it to .csv then it will be associated with Calc. Or open the .txt file from within Calc then Calc will recognize it.

edit flag offensive delete link more

Comments

@Tom Irvine -- Did this answer help you out?

qubit gravatar imagequbit ( 2013-03-17 20:23:22 +0200 )edit
0

answered 2013-02-28 03:50:28 +0200

jiero gravatar image

From my experience, by "import" you mean to have those data inserted into somewhere in current document. I don't know how.

edit flag offensive delete link more

Comments

Hi @jiero, you are right but in this case I think it just means "open" the file.

horst gravatar imagehorst ( 2013-02-28 18:01:59 +0200 )edit
0

answered 2015-07-25 00:12:22 +0200

stokescomp gravatar image

updated 2015-07-25 00:13:33 +0200

Here is a method I found to do this sort of using link to external document: http://listarchives.libreoffice.org/g...

Try this: Go to Insert | Sheet From File..., browse to your .txt file, and click Insert. In the Text Import dialogue, under "Separator options", select "Separated by", "Space", and "Merge delimiters". Click OK. In the Insert Sheet dialogue, select the position of your new sheet and - crucially - tick Link. Click OK.

See if that helps. I wish they did have an import from text file like excel though.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-02-28 01:57:12 +0200

Seen: 8,725 times

Last updated: Jul 25 '15