# Importing and Exporting Text Files

/text/scalc/guide/csv_formula.xhp
csv files;formulas
formulas; importing/exporting as csv files
exporting;formulas as csv files
importing;csv files with formulas
mw deleted "inserting;", copied 4 index entries to scalc/guide/csv_files.xhp, changed "csv files;" and "formulas;" and added 2 index entries
Importing and Exporting CSV Text Files with Formulas
Comma separated values (CSV) files are text files that contain the cell contents of a single sheet. Commas, semicolons, or other characters can be used as the field delimiters between the cells. Text strings are put in quotation marks, numbers are written without quotation marks.
To Import a CSV File
- Choose File - Open.
- In the File type field, select the format "Text CSV". Select the file and click Open. When a file has the .csv extension, the file type is automatically recognized.
- You will see the Text Import dialog. Click OK.
If the csv file contains formulas, but you want to import the results of those formulas, then choose %PRODUCTNAME - Preferences Tools - Options - %PRODUCTNAME Calc - View and clear the Formulas check box.
To Export Formulas and Values as CSV Files
- Click the sheet to be written as a csv file.
- If you want to export the formulas as formulas, for example, in the form =SUM(A1:B5), proceed as follows:
  Choose %PRODUCTNAME - Preferences Tools - Options - %PRODUCTNAME Calc - View.
  Under Display, mark the Formulas check box. Click OK.
  If you want to export the calculation results instead of the formulas, do not mark Formulas.
- Choose File - Save as. You will see the Save as dialog.
- In the File type field select the format "Text CSV".
- Enter a name and click Save.
- From the Export of text files dialog that appears, select the character set and the field and text delimiters for the data to be exported, and confirm with OK.
  If the numbers use commas as decimal separators or thousands separators, do not select the comma as the field delimiter. If the text contains double quotation marks, you must select the single quotation mark as separator.not possible to have a table here because that would break the numbering in XML.
- If necessary, after you have saved, clear the Formulas check box to see the calculated results in the table again.
%PRODUCTNAME - Preferences
Tools - Options
- %PRODUCTNAME Calc - View
Export text files
Import text files