Open and Save CSV files

From Apache OpenOffice Wiki
Jump to: navigation, search



Open and Save CSV files

Chapter 1 (Introducing Apache OpenOffice) includes instructions on starting new Calc documents, opening existing documents, and saving documents.

A special case for Calc is opening and saving comma-separated-values (CSV), which are text files that contain the cell contents of a single sheet. Each line in a CSV file represents a row in a spreadsheet. Commas, semicolons, or other characters are used to separate the cells. Text may be entered in quotation marks, numbers are entered without quotation marks.

Opening a CSV File

To open a CSV file in Calc:

  1. Choose File → Open.
  2. Locate the CSV file that you want to open.
  3. If the file has a *.csv extension, select the file and click  Open .
  4. If the file has another extension (for example, *.txt), select the file, select Text CSV (*.csv;*.txt) in the File type box (scroll down into the spreadsheet section to find it) and then click  Open .
  5. On the Text Import dialog (Figure 68), select the Separator options to divide the text in the file into columns.

You can preview the layout of the imported data at the bottom of the dialog. Right-click a column in the preview to set the format or to hide the column. Selecting Detect special numbers allows values with formatting such as currency symbols and some date formats to be read correctly. They will otherwise be read as text, which is a common source of difficulty with subsequent calculations.

If the CSV file uses a text delimiting character that is not in the Text delimiter list, click in the Other box and type the character.

  1. Click  OK  to open the file.
AOO41GS05 008.png
Figure 67 : Text Import dialog, with Comma (,) selected as the separator and double quotation mark (") as the text delimiter.

Saving as a CSV File

To save a spreadsheet as a comma separated value (CSV) file:

  1. Choose File → Save As.
  2. In the File name box, type a name for the file.
  3. In the File type list, select Text CSV (.csv) and click  Save .

You may see the message box shown below. Click  Keep Current Format .

AOO41GS05 009.png
  1. In the Export of text files dialog, select the options you want and then click  OK . You will get a warning that only the current sheet was saved. CSV files do not support multiple sheets.
AOO41GS05 010.png
Figure 68 : Choosing options when exporting to Text CSV
Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools