1*b1cdbd2cSJim Jagielski<?xml version="1.0" encoding="UTF-8"?>
2*b1cdbd2cSJim Jagielski<helpdocument version="1.0">
3*b1cdbd2cSJim Jagielski
4*b1cdbd2cSJim Jagielski<!--***********************************************************
5*b1cdbd2cSJim Jagielski *
6*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
7*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
8*b1cdbd2cSJim Jagielski * distributed with this work for additional information
9*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
10*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
11*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
12*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
13*b1cdbd2cSJim Jagielski *
14*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
15*b1cdbd2cSJim Jagielski *
16*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
17*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
18*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
20*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
21*b1cdbd2cSJim Jagielski * under the License.
22*b1cdbd2cSJim Jagielski *
23*b1cdbd2cSJim Jagielski ***********************************************************-->
24*b1cdbd2cSJim Jagielski
25*b1cdbd2cSJim Jagielski
26*b1cdbd2cSJim Jagielski
27*b1cdbd2cSJim Jagielski<meta>
28*b1cdbd2cSJim Jagielski<topic id="textscalcguidecsv_filesxml" indexer="include">
29*b1cdbd2cSJim Jagielski<title xml-lang="en-US" id="tit"> Importing and Exporting CSV Files </title>
30*b1cdbd2cSJim Jagielski<filename>/text/scalc/guide/csv_files.xhp</filename>
31*b1cdbd2cSJim Jagielski</topic>
32*b1cdbd2cSJim Jagielski</meta>
33*b1cdbd2cSJim Jagielski<body>
34*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="index" id="bm_id892361"><bookmark_value>number series import</bookmark_value>
35*b1cdbd2cSJim Jagielski<bookmark_value>data series import</bookmark_value>
36*b1cdbd2cSJim Jagielski<bookmark_value>exporting; tables as text</bookmark_value>
37*b1cdbd2cSJim Jagielski<bookmark_value>importing; tables as text</bookmark_value>
38*b1cdbd2cSJim Jagielski<bookmark_value>delimited values and files</bookmark_value>
39*b1cdbd2cSJim Jagielski<bookmark_value>comma separated files and values</bookmark_value>
40*b1cdbd2cSJim Jagielski<bookmark_value>text file import and export</bookmark_value>
41*b1cdbd2cSJim Jagielski<bookmark_value>csv files;importing and exporting</bookmark_value>
42*b1cdbd2cSJim Jagielski<bookmark_value>tables; importing/exporting as text</bookmark_value>
43*b1cdbd2cSJim Jagielski<bookmark_value>text documents; importing to spreadsheets</bookmark_value>
44*b1cdbd2cSJim Jagielski<bookmark_value>opening;text csv files</bookmark_value>
45*b1cdbd2cSJim Jagielski<bookmark_value>saving;as text csv</bookmark_value>
46*b1cdbd2cSJim Jagielski</bookmark><comment>MW deleted "importing;text data bases" and copied 4 index entries from scalc/guide/csv_formula.xhp</comment><comment>mw added "saving;" and "opening;"</comment>
47*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN10862" role="heading" level="1" l10n="NEW"><variable id="csv_files"><link href="text/scalc/guide/csv_files.xhp">Opening and Saving Text CSV Files</link>
48*b1cdbd2cSJim Jagielski</variable></paragraph>
49*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN10880" role="paragraph" l10n="NEW">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 a tabulator character.</paragraph>
50*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN10886" role="paragraph" l10n="NEW">If the field or cell contains a comma, the field or cell <emph>must</emph> be enclosed by single quotes (') or double quotes (").</paragraph>
51*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN10890" role="heading" level="2" l10n="CHG">To Open a Text CSV File in Calc</paragraph>
52*b1cdbd2cSJim Jagielski<list type="ordered">
53*b1cdbd2cSJim Jagielski<listitem>
54*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN10897" role="listitem" l10n="NEW">Choose <item type="menuitem">File - Open</item>.</paragraph>
55*b1cdbd2cSJim Jagielski</listitem>
56*b1cdbd2cSJim Jagielski<listitem>
57*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN1089F" role="listitem" l10n="NEW">Locate the CSV file that you want to open.</paragraph>
58*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN108A2" role="listitem" l10n="NEW">If the file has a *.csv extension, select the file.</paragraph>
59*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN108A5" role="listitem" l10n="NEW">If the CSV file has another extension, select the file, and then select "Text CSV" in the <item type="menuitem">File type</item> box</paragraph>
60*b1cdbd2cSJim Jagielski</listitem>
61*b1cdbd2cSJim Jagielski<listitem>
62*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN1082D" role="listitem" l10n="NEW">Click <item type="menuitem">Open</item>.</paragraph>
63*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN10834" role="listitem" l10n="NEW">The <item type="menuitem">Text Import</item> dialog opens.</paragraph>
64*b1cdbd2cSJim Jagielski</listitem>
65*b1cdbd2cSJim Jagielski<listitem>
66*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN108B1" role="listitem" l10n="NEW">Specify the options to divide the text in the file into columns.</paragraph>
67*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN108BB" role="listitem" l10n="NEW">You can preview the layout of the imported data at the bottom of the <item type="menuitem">Text Import</item> dialog. </paragraph>
68*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_id8444166" role="listitem" l10n="NEW">Right-click a column in the preview to set the format or to hide the column.</paragraph>
69*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN108E2" role="tip" l10n="CHG">Check the text delimiter 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.</paragraph>
70*b1cdbd2cSJim Jagielski</listitem>
71*b1cdbd2cSJim Jagielski<listitem>
72*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN108C5" role="listitem" l10n="NEW">Click <item type="menuitem">OK</item>.</paragraph>
73*b1cdbd2cSJim Jagielski</listitem>
74*b1cdbd2cSJim Jagielski</list>
75*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN108FA" role="heading" level="2" l10n="NEW">To Save a Sheet as a Text CSV File</paragraph>
76*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN106FC" role="note" l10n="NEW">When you export a spreadsheet to CSV format, only the data on the current sheet is saved. All other information, including formulas and formatting, is lost.</paragraph>
77*b1cdbd2cSJim Jagielski<list type="ordered">
78*b1cdbd2cSJim Jagielski<listitem>
79*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN10901" role="listitem" l10n="NEW">Open the Calc sheet that you want to save as a Text CSV file.</paragraph>
80*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN107AF" role="note" l10n="NEW">Only the current sheet can be exported.</paragraph>
81*b1cdbd2cSJim Jagielski</listitem>
82*b1cdbd2cSJim Jagielski<listitem>
83*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN10905" role="listitem" l10n="NEW">Choose <item type="menuitem">File - Save as</item>.</paragraph>
84*b1cdbd2cSJim Jagielski</listitem>
85*b1cdbd2cSJim Jagielski<listitem>
86*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN10915" role="listitem" l10n="NEW">In the <item type="menuitem">File name</item> box, enter a name for the file.</paragraph>
87*b1cdbd2cSJim Jagielski</listitem>
88*b1cdbd2cSJim Jagielski<listitem>
89*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN1090D" role="listitem" l10n="NEW">In the <item type="menuitem">File type</item> box, select "Text CSV".</paragraph>
90*b1cdbd2cSJim Jagielski</listitem>
91*b1cdbd2cSJim Jagielski<listitem>
92*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN107DD" role="listitem" l10n="NEW">(Optional) Set the field options for the Text CSV file.</paragraph>
93*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN1091C" role="listitem" l10n="NEW">Select <item type="menuitem">Edit filter settings</item>.</paragraph>
94*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN107ED" role="listitem" l10n="NEW">In the <item type="menuitem">Export of text files</item> dialog, select the options that you want.</paragraph>
95*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN107F4" role="listitem" l10n="NEW">Click <item type="menuitem">OK</item>.</paragraph>
96*b1cdbd2cSJim Jagielski</listitem>
97*b1cdbd2cSJim Jagielski<listitem>
98*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_idN107FC" role="listitem" l10n="NEW">Click <item type="menuitem">Save</item>.</paragraph>
99*b1cdbd2cSJim Jagielski</listitem>
100*b1cdbd2cSJim Jagielski</list>
101*b1cdbd2cSJim Jagielski<section id="relatedtopics">
102*b1cdbd2cSJim Jagielski<embed href="text/scalc/guide/csv_formula.xhp#csv_formula"/>
103*b1cdbd2cSJim Jagielski<embed href="text/shared/guide/data_im_export.xhp#data_im_export"/>
104*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_id3153487" role="paragraph" l10n="U" oldref="20"><switchinline select="sys"><caseinline select="MAC">%PRODUCTNAME - Preferences</caseinline><defaultinline>Tools - Options</defaultinline></switchinline> - <link href="text/shared/optionen/01060100.xhp" name="Spreadsheet - View">%PRODUCTNAME Calc - View</link></paragraph>
105*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_id3153008" role="paragraph" l10n="U" oldref="21"><link href="text/shared/00/00000207.xhp" name="Export text files">Export text files</link></paragraph>
106*b1cdbd2cSJim Jagielski<paragraph xml-lang="en-US" id="par_id3155595" role="paragraph" l10n="U" oldref="22"><link href="text/shared/00/00000208.xhp" name="Import text files">Import text files</link></paragraph>
107*b1cdbd2cSJim Jagielski</section>
108*b1cdbd2cSJim Jagielski</body>
109*b1cdbd2cSJim Jagielski</helpdocument>