1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?>
2cdf0e10cSrcweir<helpdocument version="1.0">
3cdf0e10cSrcweir
4*02dbb15cSAndrew Rist<!--***********************************************************
5cdf0e10cSrcweir *
6*02dbb15cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
7*02dbb15cSAndrew Rist * or more contributor license agreements.  See the NOTICE file
8*02dbb15cSAndrew Rist * distributed with this work for additional information
9*02dbb15cSAndrew Rist * regarding copyright ownership.  The ASF licenses this file
10*02dbb15cSAndrew Rist * to you under the Apache License, Version 2.0 (the
11*02dbb15cSAndrew Rist * "License"); you may not use this file except in compliance
12*02dbb15cSAndrew Rist * with the License.  You may obtain a copy of the License at
13*02dbb15cSAndrew Rist *
14*02dbb15cSAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
15*02dbb15cSAndrew Rist *
16*02dbb15cSAndrew Rist * Unless required by applicable law or agreed to in writing,
17*02dbb15cSAndrew Rist * software distributed under the License is distributed on an
18*02dbb15cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19*02dbb15cSAndrew Rist * KIND, either express or implied.  See the License for the
20*02dbb15cSAndrew Rist * specific language governing permissions and limitations
21*02dbb15cSAndrew Rist * under the License.
22*02dbb15cSAndrew Rist *
23*02dbb15cSAndrew Rist ***********************************************************-->
24*02dbb15cSAndrew Rist
25*02dbb15cSAndrew Rist
26cdf0e10cSrcweir
27cdf0e10cSrcweir
28cdf0e10cSrcweir<meta>
29cdf0e10cSrcweir      <topic id="textscalcguidecsv_formulaxml" indexer="include">
30cdf0e10cSrcweir         <title xml-lang="en-US" id="tit">Importing and Exporting Text Files</title>
31cdf0e10cSrcweir         <filename>/text/scalc/guide/csv_formula.xhp</filename>
32cdf0e10cSrcweir      </topic>
33cdf0e10cSrcweir   </meta>
34cdf0e10cSrcweir   <body>
35cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3153726"><bookmark_value>csv files;formulas</bookmark_value>
36cdf0e10cSrcweir      <bookmark_value>formulas; importing/exporting as csv files</bookmark_value>
37cdf0e10cSrcweir      <bookmark_value>exporting;formulas as csv files</bookmark_value>
38cdf0e10cSrcweir      <bookmark_value>importing;csv files with formulas</bookmark_value>
39cdf0e10cSrcweir</bookmark><comment>mw deleted "inserting;", copied 4 index entries to scalc/guide/csv_files.xhp, changed "csv files;" and "formulas;" and added 2 index entries</comment>
40cdf0e10cSrcweir<paragraph xml-lang="en-US" id="hd_id3153726" role="heading" level="1" l10n="U" oldref="1"><variable id="csv_formula"><link href="text/scalc/guide/csv_formula.xhp" name="Importing and Exporting Text Files">Importing and Exporting CSV Text Files with Formulas</link>
41cdf0e10cSrcweir</variable></paragraph>
42cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id3149402" role="paragraph" l10n="U" oldref="2">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.</paragraph>
43cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="hd_id3150715" role="heading" level="2" l10n="U"
44cdf0e10cSrcweir                 oldref="15">To Import a CSV File</paragraph>
45cdf0e10cSrcweir      <list type="ordered">
46cdf0e10cSrcweir         <listitem>
47cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3153709" role="listitem" l10n="U" oldref="16">Choose <emph>File - Open</emph>.</paragraph>
48cdf0e10cSrcweir         </listitem>
49cdf0e10cSrcweir         <listitem>
50cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3155445" role="listitem" l10n="U" oldref="17">In the <emph>File type</emph> field, select the format "Text CSV". Select the file and click <emph>Open</emph>. When a file has the .csv extension, the file type is automatically recognized.</paragraph>
51cdf0e10cSrcweir         </listitem>
52cdf0e10cSrcweir         <listitem>
53cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3149565" role="listitem" l10n="U" oldref="18">You will see the <item type="menuitem">Text Import</item> dialog. Click <item type="menuitem">OK</item>.</paragraph>
54cdf0e10cSrcweir         </listitem>
55cdf0e10cSrcweir      </list>
56cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id3149255" role="tip" l10n="CHG" oldref="19">If the csv file contains formulas, but you want to import the results of those formulas, then choose <emph><switchinline select="sys"><caseinline select="MAC">%PRODUCTNAME - Preferences</caseinline><defaultinline>Tools - Options</defaultinline></switchinline> - %PRODUCTNAME Calc - View</emph> and clear the <emph>Formulas</emph> check box.</paragraph>
57cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="hd_id3154022" role="heading" level="2" l10n="U" oldref="3">To Export Formulas and Values as CSV Files</paragraph>
58cdf0e10cSrcweir      <list type="ordered">
59cdf0e10cSrcweir         <listitem>
60cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3150342" role="listitem" l10n="U" oldref="4">Click the sheet to be written as a csv file.</paragraph>
61cdf0e10cSrcweir         </listitem>
62cdf0e10cSrcweir         <listitem>
63cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3166423" role="listitem" l10n="U" oldref="5">If you want to export the formulas as formulas, for example, in the form =SUM(A1:B5), proceed as follows:</paragraph>
64cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3155111" role="listitem" l10n="U" oldref="6">Choose <emph><switchinline select="sys"><caseinline select="MAC">%PRODUCTNAME - Preferences</caseinline><defaultinline>Tools - Options</defaultinline></switchinline> - %PRODUCTNAME Calc - View</emph>.</paragraph>
65cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3150200" role="listitem" l10n="U" oldref="7">Under <emph>Display</emph>, mark the <emph>Formulas</emph> check box. Click <emph>OK</emph>.</paragraph>
66cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3154484" role="listitem" l10n="U" oldref="8">If you want to export the calculation results instead of the formulas, do not mark <emph>Formulas</emph>.</paragraph>
67cdf0e10cSrcweir         </listitem>
68cdf0e10cSrcweir         <listitem>
69cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3148702" role="listitem" l10n="U" oldref="9">Choose <emph>File - Save as</emph>. You will see the <emph>Save as</emph> dialog.</paragraph>
70cdf0e10cSrcweir         </listitem>
71cdf0e10cSrcweir         <listitem>
72cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3153912" role="listitem" l10n="U" oldref="10">In the<emph/>
73cdf0e10cSrcweir               <item type="menuitem">File type</item> field select the format "Text CSV".</paragraph>
74cdf0e10cSrcweir         </listitem>
75cdf0e10cSrcweir         <listitem>
76cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3157978" role="listitem" l10n="U" oldref="13">Enter a name and click <emph>Save</emph>.</paragraph>
77cdf0e10cSrcweir         </listitem>
78cdf0e10cSrcweir         <listitem>
79cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3152869" role="listitem" l10n="U" oldref="23">From the <emph>Export of text files</emph> dialog that appears, select the character set and the field and text delimiters for the data to be exported, and confirm with <emph>OK</emph>.</paragraph>
80cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3146781" role="warning" l10n="U" oldref="12">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.<comment>not possible to have a table here because that would break the numbering in XML.</comment></paragraph>
81cdf0e10cSrcweir         </listitem>
82cdf0e10cSrcweir         <listitem>
83cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3150050" role="listitem" l10n="U" oldref="14">If necessary, after you have saved, clear the <emph>Formulas</emph> check box to see the calculated results in the table again.</paragraph>
84cdf0e10cSrcweir         </listitem>
85cdf0e10cSrcweir      </list>
86cdf0e10cSrcweir      <section id="relatedtopics">
87cdf0e10cSrcweir         <embed href="text/scalc/guide/csv_files.xhp#csv_files"/>
88cdf0e10cSrcweir         <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>
89cdf0e10cSrcweir         <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>
90cdf0e10cSrcweir         <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>
91cdf0e10cSrcweir      </section>
92cdf0e10cSrcweir   </body>
93cdf0e10cSrcweir</helpdocument>