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
28*b1cdbd2cSJim Jagielski<meta>
29*b1cdbd2cSJim Jagielski      <topic id="textscalcguidecsv_formulaxml" indexer="include">
30*b1cdbd2cSJim Jagielski         <title xml-lang="en-US" id="tit">Importing and Exporting Text Files</title>
31*b1cdbd2cSJim Jagielski         <filename>/text/scalc/guide/csv_formula.xhp</filename>
32*b1cdbd2cSJim Jagielski      </topic>
33*b1cdbd2cSJim Jagielski   </meta>
34*b1cdbd2cSJim Jagielski   <body>
35*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="index" id="bm_id3153726"><bookmark_value>csv files;formulas</bookmark_value>
36*b1cdbd2cSJim Jagielski      <bookmark_value>formulas; importing/exporting as csv files</bookmark_value>
37*b1cdbd2cSJim Jagielski      <bookmark_value>exporting;formulas as csv files</bookmark_value>
38*b1cdbd2cSJim Jagielski      <bookmark_value>importing;csv files with formulas</bookmark_value>
39*b1cdbd2cSJim Jagielski</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>
40*b1cdbd2cSJim Jagielski<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>
41*b1cdbd2cSJim Jagielski</variable></paragraph>
42*b1cdbd2cSJim Jagielski      <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>
43*b1cdbd2cSJim Jagielski      <paragraph xml-lang="en-US" id="hd_id3150715" role="heading" level="2" l10n="U"
44*b1cdbd2cSJim Jagielski                 oldref="15">To Import a CSV File</paragraph>
45*b1cdbd2cSJim Jagielski      <list type="ordered">
46*b1cdbd2cSJim Jagielski         <listitem>
47*b1cdbd2cSJim Jagielski            <paragraph xml-lang="en-US" id="par_id3153709" role="listitem" l10n="U" oldref="16">Choose <emph>File - Open</emph>.</paragraph>
48*b1cdbd2cSJim Jagielski         </listitem>
49*b1cdbd2cSJim Jagielski         <listitem>
50*b1cdbd2cSJim Jagielski            <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>
51*b1cdbd2cSJim Jagielski         </listitem>
52*b1cdbd2cSJim Jagielski         <listitem>
53*b1cdbd2cSJim Jagielski            <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>
54*b1cdbd2cSJim Jagielski         </listitem>
55*b1cdbd2cSJim Jagielski      </list>
56*b1cdbd2cSJim Jagielski      <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>
57*b1cdbd2cSJim Jagielski      <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>
58*b1cdbd2cSJim Jagielski      <list type="ordered">
59*b1cdbd2cSJim Jagielski         <listitem>
60*b1cdbd2cSJim Jagielski            <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>
61*b1cdbd2cSJim Jagielski         </listitem>
62*b1cdbd2cSJim Jagielski         <listitem>
63*b1cdbd2cSJim Jagielski            <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>
64*b1cdbd2cSJim Jagielski            <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>
65*b1cdbd2cSJim Jagielski            <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>
66*b1cdbd2cSJim Jagielski            <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>
67*b1cdbd2cSJim Jagielski         </listitem>
68*b1cdbd2cSJim Jagielski         <listitem>
69*b1cdbd2cSJim Jagielski            <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>
70*b1cdbd2cSJim Jagielski         </listitem>
71*b1cdbd2cSJim Jagielski         <listitem>
72*b1cdbd2cSJim Jagielski            <paragraph xml-lang="en-US" id="par_id3153912" role="listitem" l10n="U" oldref="10">In the<emph/>
73*b1cdbd2cSJim Jagielski               <item type="menuitem">File type</item> field select the format "Text CSV".</paragraph>
74*b1cdbd2cSJim Jagielski         </listitem>
75*b1cdbd2cSJim Jagielski         <listitem>
76*b1cdbd2cSJim Jagielski            <paragraph xml-lang="en-US" id="par_id3157978" role="listitem" l10n="U" oldref="13">Enter a name and click <emph>Save</emph>.</paragraph>
77*b1cdbd2cSJim Jagielski         </listitem>
78*b1cdbd2cSJim Jagielski         <listitem>
79*b1cdbd2cSJim Jagielski            <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>
80*b1cdbd2cSJim Jagielski            <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>
81*b1cdbd2cSJim Jagielski         </listitem>
82*b1cdbd2cSJim Jagielski         <listitem>
83*b1cdbd2cSJim Jagielski            <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>
84*b1cdbd2cSJim Jagielski         </listitem>
85*b1cdbd2cSJim Jagielski      </list>
86*b1cdbd2cSJim Jagielski      <section id="relatedtopics">
87*b1cdbd2cSJim Jagielski         <embed href="text/scalc/guide/csv_files.xhp#csv_files"/>
88*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>
89*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>
90*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>
91*b1cdbd2cSJim Jagielski      </section>
92*b1cdbd2cSJim Jagielski   </body>
93*b1cdbd2cSJim Jagielski</helpdocument>