[Solved] Opening Text File to Convert to Spreadsheet

Discuss the spreadsheet application
Post Reply
barryaf
Posts: 2
Joined: Fri Jan 18, 2008 4:40 pm

[Solved] Opening Text File to Convert to Spreadsheet

Post by barryaf »

I am trying to open a text file that has space delimited data in it but after going to 'open' in calc and selecting the file, it opens the text file in writer. If I open the file from command line (scalc file.dat) it gives me the 'text import' tool. How do I get the 'text import' tool to open like it does with Microsoft Excel by selecting 'open' from the 'file' menu?
Last edited by Hagar Delest on Tue Jun 10, 2008 3:54 pm, edited 2 times in total.
Reason: tagged the thread as Solved.
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Opening Text File to Convert to Spreadsheet

Post by Villeroy »

Change the file name extension to csv.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
probe1
Volunteer
Posts: 277
Joined: Mon Oct 08, 2007 1:34 am
Location: Chonburi Thailand

Re: Opening Text File to Convert to Spreadsheet

Post by probe1 »

no need to change the file name:

go to directory where the file is located, choose Text CSV (*.csv; *.txt) as filter in OPEN dialogue and type file name, hit ENTER.
Cheers
Winfried

DateTime2 extension: insert date, time or timestamp, formatted to your needs
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Opening Text File to Convert to Spreadsheet

Post by acknak »

There are a couple of ways to do this.

One is:
1) File > Open
2) Select your file "file.dat"
3) Use the "File Type" drop down to select "Text CSV" (scroll down the list; it's in with the other spreadsheet formats)
4) OK

That will specify a file name and a file type that opens in Calc.

However, I don't recommend that you use this method.

When you File > Open any file in OOo, OOo edits that file--just like if you opened a spreadsheet document. Calc will behave exactly as if you were working on a spreadsheet, but when you save the file, it will only save CSV text not a full spreadsheet. If you forget that you are working on a CSV file and not a spreadsheet file, you can lose work.

I prefer this method:
1) Insert > Sheet From File
2-4) same as above

That brings in the data but keeps the working document as a full, normal spreadsheet.
AOO4/LO5 • Linux • Fedora 23
huw
Volunteer
Posts: 417
Joined: Wed Nov 21, 2007 1:57 pm

Re: Opening Text File to Convert to Spreadsheet

Post by huw »

acknak wrote:There are a couple of ways to do this.

One is:
1) File > Open
2) Select your file "file.dat"
3) Use the "File Type" drop down to select "Text CSV" (scroll down the list; it's in with the other spreadsheet formats)
4) OK
5) Save as ODT
acknak wrote:When you File > Open any file in OOo, OOo edits that file--just like if you opened a spreadsheet document. Calc will behave exactly as if you were working on a spreadsheet, but when you save the file, it will only save CSV text, not a full spreadsheet. If you forget that you are working on a CSV file and not a spreadsheet file, you can lose work.
CSV can also only cope with one sheet, so all sheets but the current one will be lost when you save.
barryaf
Posts: 2
Joined: Fri Jan 18, 2008 4:40 pm

Re: Opening Text File to Convert to Spreadsheet

Post by barryaf »

Thank you very much for all the suggestions. They are very helpful.
eikelein
Posts: 5
Joined: Wed Nov 28, 2007 1:17 pm
Location: WI, USA

Re: [Solved] Opening Text File to Convert to Spreadsheet

Post by eikelein »

Sorry for chiming in here after the "Solved" tagging.
But both methods described here DO NOT WORK for me at all. :cry:
No matter which way I take OO always opens the file in Writer and Writer can't save it as .csv.

OO 2.3.1, Win XP SP2
User avatar
kingfisher
Volunteer
Posts: 2123
Joined: Tue Nov 20, 2007 10:53 am

Re: [Solved] Opening Text File to Convert to Spreadsheet

Post by kingfisher »

Now that the thread is tagged as solved, you would improve your chances of getting help if you start a new thread, eikelein.

I suggest you give more details of the file you want to open in Calc and, if it's not sensitive, upload it.

The need to open such files in Calc has been the subject of various issues. The method suggested by acknak is the official workaround. It's time consuming if you need to open a number of such files.

Are you not able to create a new spreadsheet and use Menu: Insert >Sheet from file?
Last edited by kingfisher on Mon Jan 21, 2008 2:56 am, edited 1 time in total.
Apache OpenOffice 4.1.9 on Linux
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Solved] Opening Text File to Convert to Spreadsheet

Post by acknak »

These methods do work, we just have to figure out why they're not working for you.

There's no problem to continue a "SOLVED" thread. In fact, the solution to your side of the problem may help someone else, so don't worry about it.

Please describe exactly what you're trying to do, and what you did, and what happened when you did it---step by step: what your data looks like (give a sample if you can), what menus you used, what keys you pressed, all that stuff.

PS: Here's a sample: Starting from a Writer window, I opened a programming code source file (text) named "gauge-new.pl" in a Calc spreadsheet:
Image
You do have complete control over where the file opens, it's just not terribly convenient.
AOO4/LO5 • Linux • Fedora 23
Post Reply