[Solved] Opening Text File to Convert to Spreadsheet

Discuss the spreadsheet application

[Solved] Opening Text File to Convert to Spreadsheet

Postby barryaf » Fri Jan 18, 2008 4:51 pm

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.
barryaf
 
Posts: 2
Joined: Fri Jan 18, 2008 4:40 pm

Re: Opening Text File to Convert to Spreadsheet

Postby Villeroy » Fri Jan 18, 2008 5:59 pm

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, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28845
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Opening Text File to Convert to Spreadsheet

Postby probe1 » Fri Jan 18, 2008 6:03 pm

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
probe1
Volunteer
 
Posts: 277
Joined: Mon Oct 08, 2007 1:34 am
Location: Chonburi Thailand

Re: Opening Text File to Convert to Spreadsheet

Postby acknak » Fri Jan 18, 2008 6:20 pm

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
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

Postby huw » Fri Jan 18, 2008 6:31 pm

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.
huw
Volunteer
 
Posts: 417
Joined: Wed Nov 21, 2007 1:57 pm

Re: Opening Text File to Convert to Spreadsheet

Postby barryaf » Fri Jan 18, 2008 8:08 pm

Thank you very much for all the suggestions. They are very helpful.
barryaf
 
Posts: 2
Joined: Fri Jan 18, 2008 4:40 pm

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

Postby eikelein » Sun Jan 20, 2008 6:39 pm

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
eikelein
 
Posts: 5
Joined: Wed Nov 28, 2007 1:17 pm
Location: WI, USA

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

Postby kingfisher » Sun Jan 20, 2008 9:43 pm

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.6 on PCLinuxOS
User avatar
kingfisher
Volunteer
 
Posts: 2120
Joined: Tue Nov 20, 2007 10:53 am

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

Postby acknak » Mon Jan 21, 2008 1:37 am

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
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3


Return to Calc

Who is online

Users browsing this forum: No registered users and 18 guests