[Solved] How to import a txt file

Discuss the spreadsheet application

[Solved] How to import a txt file

Postby firebirddo » Mon May 16, 2011 1:36 pm

Hi - I usually use ms office products for my needs but thought i would try to move to this product. I have looked for help with my problem but cannot seem to find the answer. What i am trying to do is to open a txt file that has rows and columns of numbers so that it opens in the product in cells - when i try it just seems to display the page without any cell placement. the ms office allows you to specify delimiters etc so that you can import text files into cells depending on character tabs spaces etc - can this be done with this product and if so can you give me a pointer on how to get started doing it.

thanks

Title Edited. A descriptive title for posts helps others who are searching for solutions and increases the chances of a reply (Hagar, Moderator).
Last edited by Hagar Delest on Mon May 16, 2011 4:38 pm, edited 2 times in total.
Reason: tagged [Solved].
OpenOffice 3.3.0 on Windows Vista
firebirddo
 
Posts: 3
Joined: Mon May 16, 2011 1:27 pm

Re: beginners question

Postby firebirddo » Mon May 16, 2011 1:47 pm

ok i figured it out i think - i just renamed the txt file as a csv file and then selected the delimiters i needed
OpenOffice 3.3.0 on Windows Vista
firebirddo
 
Posts: 3
Joined: Mon May 16, 2011 1:27 pm

Re: beginners question

Postby acknak » Mon May 16, 2011 2:24 pm

... the ms office allows you to specify delimiters etc so that you can import text files into cells depending on character tabs spaces etc - can this be done with this product...

I recommend first starting a new spreadsheet, then using Insert > Sheet From File, then selecting your text file.

That will give you the text import options you're looking for, and it will work with any file name--you don't have to rename the file.

Further--and maybe more important--it produces a spreadsheet document, not a "text file" document.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: beginners question

Postby firebirddo » Mon May 16, 2011 2:27 pm

thanks that does indeed provide the same method as the office product without a need for renaming the file

Further--and maybe more important--it produces a spreadsheet document, not a "text file" document.
- the other method i used did that as well.

my method does however have one advantage in that you can just select the csv file and open it just by selecting open file with openoffice - so it saves time when doing lots of documents as the rename is quicker than the other process
OpenOffice 3.3.0 on Windows Vista
firebirddo
 
Posts: 3
Joined: Mon May 16, 2011 1:27 pm

Re: beginners question

Postby acknak » Mon May 16, 2011 4:02 pm

firebirddo wrote:
Further--and maybe more important--it produces a spreadsheet document, not a "text file" document.
- the other method i used did that as well.
my method does however have one advantage in that you can just select the csv file and open it just by selecting open file with openoffice - so it saves time when doing lots of documents as the rename is quicker than the other process

Maybe I misunderstand what you've done, but using File > Open with a text file does not create a spreadsheet document.

If you open a text file and import the data, then go forward and format the cells or add formulas as you would in a normal spreadsheet, then save the file, OOo will save the work back into the original file, as plain text again. All your formatting and formulas will be lost. There are warnings telling you what's happening, but the user has to be savvy enough to break out of the default operation and do something else or the work will be lost and the original data modified and maybe corrupted.

If you have to routinely deal with lots of text data import, then there are much better ways than we have discussed in this thread. It takes some rather technical set up, but once that's done, you can access the text files safely and easily.

Here are some links to previous threads on this subject:
viewtopic.php?f=9&t=39465
viewtopic.php?p=177673#p177673

I think there are some better ones, but I can't find them ATM. Maybe someone else has a link ready.
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 12 guests