Opening/importing files

Besides typing data in manually, there are several ways to get data into a spreadsheet. Calc will let you import data from other systems.

If you select open from the file menu and click the “files of type” dropdown you will see that OpenOffice is compatible with an huge number of programs and file formats.

If you scroll down a bit, you'll find a whole area that deals with spreadsheets. Often you can just open up a file and OpenOffice will convert it for you then you can immediately begin to use the file.

If the source system can't produce a document compatible with OpenOffice you can often export the data to a delimited text file. This is a good thing and a bad thing. It's good because it will allow you to import data from almost any system into Calc. It's a bad thing because you'll have to do a few extra steps to properly import the data.

To demonstrate how to import text files, we'll import a text file containing sales transactions from the Fictitious Garden Center sales database into Calc.

First, we'll select the file > open command from the menu, then open the salestransaction.csv file.

Calc will display the text import screen. The purpose of this screen is to let you control how the data in the file is mapped to cells in the spreadsheet.

Text files usually contain data fields separated by characters called delimiters. The delimiter is usually a comma or a tab surrounded by either single or double quotes.

Our file is delimited by double quotes and a comma. We'll make sure the comma box is checked, and the text delimiter is set to double quotes. Calc will preview the import at the bottom of the screen.

One of the columns contains a date, Calc will let us specify that the column is a date and specify the format of the date. Right click on the column and specify a date in Month/Day/Year format.

The import looks fine, so we'll click the OK button.

 
previous | table of contents | next
© copyright 2005 LearnOpenOffice.org