summaryrefslogtreecommitdiff
path: root/modules/spreadsheet/help/en_US/readxls.xml
blob: ab53f8469133296ec69530ee7042e631399aae19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2005      - INRIA - Pierrick MODE
 * Copyright (C) 2005-2008 - INRIA - Serge STEER <serge.steer@inria.fr>
 *
 * This file must be used under the terms of the CeCILL.
 * This source file is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.  The terms
 * are also available at
 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
 *
 -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="readxls">
    <refnamediv>
        <refname>readxls</refname>
        <refpurpose>reads an Excel file</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Calling Sequence</title>
        <synopsis>sheets = readxls(file_path)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>file_path</term>
                <listitem>
                    <para>a character string: the path of the Excel file.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>sheets</term>
                <listitem>
                    <para>
                        an <literal>mlist</literal> of type <literal>xls</literal>, with one field named <literal>sheets</literal>
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            Given an Excel file path this function returns an <literal>mlist</literal> data structure
            of type <literal>xls</literal>, with one field named <literal>sheets</literal>. The
            <literal>sheets</literal> field itself contains a list of sheet data structure.
        </para>
        <para>
            <literal>sheet=mlist(['xlssheet','name','text','value'],sheetname,Text,Value)</literal> where 
            <literal>sheetname</literal> is a character string containing the name of the sheet,
            <literal>Text</literal> is a matrix of string which contains the cell's
            strings and  <literal>Value</literal> is a matrix of numbers which contains the cell's
            values. 
        </para>
        <para> 
            <warning>
                Only BIFF8 Excel files (last Excel file version (2003)) are handled.
            </warning>
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[ 
Sheets = readxls('SCI/modules/spreadsheet/demos/xls/t1.xls')
// some basic operations on Sheets
typeof(Sheets)
s1=Sheets(1) //get the first sheet
typeof(s1)
s1.value //get the first sheet value field
s1.text  //get the first sheet text field
s1(2,:)  //get the 2 row of the sheet
typeof(s1(2,:))

disp(s1)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See Also</title>
        <simplelist type="inline">
            <member>
                <link linkend="xls_open">xls_open</link>
            </member>
            <member>
                <link linkend="xls_read">xls_read</link>
            </member>
        </simplelist>
    </refsection>
    <refsection>
        <title>Used Functions</title>
        <para>
            This function is based on the Scilab functions <literal>xls_open</literal>
            and  <literal>xls_read</literal>.
        </para>
    </refsection>
</refentry>