Importing and Exporting CSV Files

Module
Contents
Index 🔎︎

# Opening and Saving Text CSV Files

Comma Separated Values (CSV) is a text file format that you can use to exchange data from a database or a spreadsheet between applications. Each line in a Text CSV file represents a record in the database, or a row in a spreadsheet. Each field in a database record or cell in a spreadsheet row is usually separated by a comma. However, you can use other characters to delimit a field, such as semicolon or tab characters.

If the field or cell contains a comma, its content must be enclosed by single quotes (') or double quotes (").

## To Open a Text CSV File in Calc

1. Choose File - Open.

2. Locate the CSV file that you want to open.

   If the file has a *.csv extension, select the file.

   If the CSV file has another extension, select the file, and then select "Text CSV" in the File type box

3. Click Open.

   The Text Import dialogue box opens.

4. Specify the options to divide the text in the file into columns.

   You can preview the layout of the imported data at the bottom of the Text Import dialogue box.

   Right-click a column in the preview to set the format or to hide the column.

   Mark the text delimiter check box that matches the character used as text delimiter in the file. In case of an unlisted delimiter, type the character into the input box.

5. Click OK.

## To Save a Sheet as a Text CSV File

When you export a spreadsheet to CSV format, only the data on the current sheet is saved. All other information, including formulae and formatting, is omitted.

1. Open the Calc sheet that you want to save as a Text CSV file.

   Only the current sheet can be exported.

2. Choose File - Save as.

3. In the File name box, enter a name for the file.

4. In the File type box, select "Text CSV".

5. (Optional) Set the field options for the Text CSV file.

   Select Edit filter settings.

   In the Export of text files dialogue box, select the options that you want.

   Click OK.

6. Click Save.

Related Topics

Importing and Exporting CSV Text Files with Formulae

Importing and Exporting Data in Base

LibreOffice - PreferencesTools - Options
- LibreOffice Calc - View

Export text files

Import text files