Opening CSV Files

From Apache OpenOffice Wiki
Jump to: navigation, search



Opening CSV Files

Comma-separated-values (CSV) files 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 is entered in quotation marks; numbers are entered without quotation marks.

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 16), 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 hide the column.
    If the CSV file uses a text delimiter character not in the Text delimiter list, click in the box, and type the character.
  6. The Detect special numbers option is very helpful for importing numbers written with currency symbols or dates that will otherwise be treated as text.
  7. Click  OK  to open the file.
AOO41CG01 016.png
Figure 16: Text Import dialog, with Comma (,) selected as the separator and double quotation mark (“) as the text delimiter.
Documentation caution.png If you do not select Text CSV (*csv;*txt) as the file type when opening the file, the document opens in Writer, not Calc.
Personal tools