Sophie

Sophie

distrib > Fedora > 15 > x86_64 > by-pkgid > 784c7185bb6d0646e8bce92e6f61fb78 > files > 72

freexl-devel-1.0.0a-3.fc15.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>FreeXL: test_xl.c</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">FreeXL&#160;<span id="projectnumber">1.0.0a</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">test_xl.c</div>  </div>
</div>
<div class="contents">
<p>test_xl.c is a simple demonstration and diagnostic tool for the Excel (.xls) file format.This sample code provides an example of:</p>
<ul>
<li>opening the .xls file</li>
<li>querying general information</li>
<li>querying Workbooks, SST entries and FAT entries</li>
<li>error handling</li>
<li>closing the .xls file when no further operations are required</li>
</ul>
<p>Here is an example of a typical run: </p>
<div class="fragment"><pre class="fragment">
./test_xl multi.xls

Excel document: multi.xls
==========================================================
CFBF Version ........: 3
CFBF Sector size ....: 512
CFBF FAT entries ....: 128
BIFF Version ........: 8 [Excel 98/XP/2003/2007/2010]
BIFF Max record size : 8224
BIFF DateMode .......: 0 [day#1 = '1900-01-01']
BIFF Password/Crypted: NO, clear data
BIFF CodePage .......: UTF-16LE [Unicode]
BIFF Worksheets .....: 2
BIFF SST entries ....: 24
BIFF Formats ........: 2
BIFF eXtendedFormats : 24

Worksheets:
=========================================================
  0] I'm a Worsheet
        ok, Worksheet succesfully selected: currently active: 0
        12 Rows X 7 Columns

  1] Yet another
        ok, Worksheet succesfully selected: currently active: 1
        302 Rows X 4 Columns
</pre></div><p>Here is another example. Note that this earlier version (Excel 3.0) format does not use the CFBF container, so no information is provided for the first three entries. </p>
<div class="fragment"><pre class="fragment">
# ./test_xl v3sample.xls

Excel document: v3sample.xls
==========================================================
CFBF Version ........: UNKNOWN
CFBF Sector size ....: UNKNOWN
CFBF FAT entries ....: 0
BIFF Version ........: 3 [Excel 3.0]
BIFF Max record size : UNKNOWN
BIFF DateMode .......: 0 [day#1 = '1900-01-01']
BIFF Password/Crypted: NO, clear data
BIFF CodePage .......: CP1252 [Windows Latin 1]
BIFF Worksheets .....: 1
BIFF Formats ........: 21
BIFF eXtendedFormats : 25

Worksheets:
=========================================================
  0] Worksheet
        ok, Worksheet succesfully selected: currently active: 0
        17 Rows X 6 Columns
</pre></div><p>For more information, or to aid with debugging, you can specify a -verbose flag, as shown in this example: </p>
<div class="fragment"><pre class="fragment">
# ./test_xl multi.xls -verbose

Excel document: multi.xls
==========================================================
...

Worksheets:
=========================================================
...

SST [Shared String Table]:
=========================================================
       0] uno
       1] one
       2] due
       3] two
       4] tre
       5] three
...
      18] dieci
      19] ten
      20] undici
      21] eleven
      22] dodici
      23] twelve

FAT entries [File Allocation Table]:
=========================================================
       0 -&gt; 0xfffffffe FATSECT
       1 -&gt; 0xffffffff FREESECT
       2 -&gt;        3
       3 -&gt;        4
...      
      36 -&gt;       37
      37 -&gt;       38
      38 -&gt; 0xfffffffe ENDOFCHAIN
      39 -&gt; 0xfffffffe ENDOFCHAIN
      40 -&gt;       41
      41 -&gt; 0xfffffffe ENDOFCHAIN
      42 -&gt;       43
      43 -&gt; 0xfffffffe ENDOFCHAIN
      44 -&gt; 0xffffffff FREESECT
...
     127 -&gt; 0xffffffff FREESECT
</pre></div><div class="fragment"><pre class="fragment"><span class="comment">/* </span>
<span class="comment">/ test_xl.c</span>
<span class="comment">/</span>
<span class="comment">/ FreeXL Sample code</span>
<span class="comment">/</span>
<span class="comment">/ Author: Sandro Furieri a.furieri@lqt.it</span>
<span class="comment">/</span>
<span class="comment">/ ------------------------------------------------------------------------------</span>
<span class="comment">/ </span>
<span class="comment">/ Version: MPL 1.1/GPL 2.0/LGPL 2.1</span>
<span class="comment">/ </span>
<span class="comment">/ The contents of this file are subject to the Mozilla Public License Version</span>
<span class="comment">/ 1.1 (the &quot;License&quot;); you may not use this file except in compliance with</span>
<span class="comment">/ the License. You may obtain a copy of the License at</span>
<span class="comment">/ http://www.mozilla.org/MPL/</span>
<span class="comment">/ </span>
<span class="comment">/ Software distributed under the License is distributed on an &quot;AS IS&quot; basis,</span>
<span class="comment">/ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License</span>
<span class="comment">/ for the specific language governing rights and limitations under the</span>
<span class="comment">/ License.</span>
<span class="comment">/</span>
<span class="comment">/ The Original Code is the FreeXL library</span>
<span class="comment">/</span>
<span class="comment">/ The Initial Developer of the Original Code is Alessandro Furieri</span>
<span class="comment">/ </span>
<span class="comment">/ Portions created by the Initial Developer are Copyright (C) 2011</span>
<span class="comment">/ the Initial Developer. All Rights Reserved.</span>
<span class="comment">/ </span>
<span class="comment">/ Contributor(s):</span>
<span class="comment">/ Brad Hards</span>
<span class="comment">/ </span>
<span class="comment">/ Alternatively, the contents of this file may be used under the terms of</span>
<span class="comment">/ either the GNU General Public License Version 2 or later (the &quot;GPL&quot;), or</span>
<span class="comment">/ the GNU Lesser General Public License Version 2.1 or later (the &quot;LGPL&quot;),</span>
<span class="comment">/ in which case the provisions of the GPL or the LGPL are applicable instead</span>
<span class="comment">/ of those above. If you wish to allow use of your version of this file only</span>
<span class="comment">/ under the terms of either the GPL or the LGPL, and not to allow others to</span>
<span class="comment">/ use your version of this file under the terms of the MPL, indicate your</span>
<span class="comment">/ decision by deleting the provisions above and replace them with the notice</span>
<span class="comment">/ and other provisions required by the GPL or the LGPL. If you do not delete</span>
<span class="comment">/ the provisions above, a recipient may use your version of this file under</span>
<span class="comment">/ the terms of any one of the MPL, the GPL or the LGPL.</span>
<span class="comment">/ </span>
<span class="comment">*/</span>

<span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<span class="preprocessor">#include &lt;stdio.h&gt;</span>
<span class="preprocessor">#include &lt;string.h&gt;</span>

<span class="preprocessor">#include &quot;<a class="code" href="freexl_8h.html" title="Function declarations and constants for FreeXL library.">freexl.h</a>&quot;</span>

<span class="keywordtype">int</span>
main (<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[])
{
    <span class="keyword">const</span> <span class="keywordtype">void</span> *handle;
    <span class="keywordtype">int</span> ret;
    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> info;
    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> fat_count;
    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sst_count;
    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> worksheet_count;
    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> format_count;
    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> xf_count;
    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> idx;
    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> next_sector;
    <span class="keywordtype">int</span> biff_v8 = 0;
    <span class="keyword">const</span> <span class="keywordtype">char</span> *utf8_string;
    <span class="keywordtype">int</span> verbose = 0;

    <span class="keywordflow">if</span> (argc == 2 || argc == 3)
      {
          <span class="keywordflow">if</span> (argc == 3)
            {
                <span class="keywordflow">if</span> (strcmp (argv[2], <span class="stringliteral">&quot;-verbose&quot;</span>) == 0)
                    verbose = 1;
            }
      }
    <span class="keywordflow">else</span>
      {
          fprintf (stderr, <span class="stringliteral">&quot;usage: text_xl path.xls [-verbose]\n&quot;</span>);
          <span class="keywordflow">return</span> -1;
      }

<span class="comment">/* opening the .XLS file [Workbook] */</span>
    ret = <a name="a0"></a><a class="code" href="freexl_8h.html#acbd27ba5bc7b21d4ae32c0542d51f1e4" title="Open the .xls file, preparing for future functions.">freexl_open</a> (argv[1], &amp;handle);
    <span class="keywordflow">if</span> (ret != <a name="a1"></a><a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
      {
          fprintf (stderr, <span class="stringliteral">&quot;OPEN ERROR: %d\n&quot;</span>, ret);
          <span class="keywordflow">return</span> -1;
      }

<span class="comment">/* </span>
<span class="comment"> * reporting .XLS information</span>
<span class="comment"> */</span>

    printf (<span class="stringliteral">&quot;\nExcel document: %s\n&quot;</span>, argv[1]);
    printf (<span class="stringliteral">&quot;==========================================================\n&quot;</span>);

<span class="comment">/* CFBF version */</span>
    ret = <a name="a2"></a><a class="code" href="freexl_8h.html#ad6dbe072c7a4632853d90f4509bf3aee" title="Query general information about the Workbook and Worksheets.">freexl_get_info</a> (handle, <a name="a3"></a><a class="code" href="freexl_8h.html#aeb27c5f0cb5501bb757a590cf9838330" title="Information query for CFBF version.">FREEXL_CFBF_VERSION</a>, &amp;info);
    <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
      {
          fprintf (stderr, <span class="stringliteral">&quot;GET-INFO [FREEXL_CFBF_VERSION] Error: %d\n&quot;</span>, ret);
          <span class="keywordflow">goto</span> stop;
      }
    <span class="keywordflow">switch</span> (info)
      {
      <span class="keywordflow">case</span> <a name="a4"></a><a class="code" href="freexl_8h.html#ac98dd3dac4d22c700f17d4a9b439e365" title="CFBF file is version 3.">FREEXL_CFBF_VER_3</a>:
          printf (<span class="stringliteral">&quot;CFBF Version ........: 3\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a5"></a><a class="code" href="freexl_8h.html#a2dad7130ff02874faf5fe471c4a574f0" title="CFBF file is version 4.">FREEXL_CFBF_VER_4</a>:
          printf (<span class="stringliteral">&quot;CFBF Version ........: 4\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a6"></a><a class="code" href="freexl_8h.html#a1dc568df975757f9758273e459bf75aa" title="query is not applicable, or information is not available">FREEXL_UNKNOWN</a>:
          printf (<span class="stringliteral">&quot;CFBF Version ........: UNKNOWN\n&quot;</span>);
          <span class="keywordflow">break</span>;
      };

<span class="comment">/* CFBF sector size */</span>
    ret = <a class="code" href="freexl_8h.html#ad6dbe072c7a4632853d90f4509bf3aee" title="Query general information about the Workbook and Worksheets.">freexl_get_info</a> (handle, <a name="a7"></a><a class="code" href="freexl_8h.html#a72b98cfe264690cba00d01cd0c3e5806" title="Information query for CFBF sector size.">FREEXL_CFBF_SECTOR_SIZE</a>, &amp;info);
    <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
      {
          fprintf (stderr, <span class="stringliteral">&quot;GET-INFO [FREEXL_CFBF_SECTOR_SIZE] Error: %d\n&quot;</span>,
                   ret);
          <span class="keywordflow">goto</span> stop;
      }
    <span class="keywordflow">switch</span> (info)
      {
      <span class="keywordflow">case</span> <a name="a8"></a><a class="code" href="freexl_8h.html#ac9b06dbc441e1b934a98accb5fa5556f" title="CFBF file uses 512 byte sectors.">FREEXL_CFBF_SECTOR_512</a>:
          printf (<span class="stringliteral">&quot;CFBF Sector size ....: 512\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a9"></a><a class="code" href="freexl_8h.html#ae71c9b6692fe2226818a91a718b0e460" title="CFBF file uses 4096 (4K) sectors.">FREEXL_CFBF_SECTOR_4096</a>:
          printf (<span class="stringliteral">&quot;CFBF Sector size ....: 4096\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a class="code" href="freexl_8h.html#a1dc568df975757f9758273e459bf75aa" title="query is not applicable, or information is not available">FREEXL_UNKNOWN</a>:
          printf (<span class="stringliteral">&quot;CFBF Sector size ....: UNKNOWN\n&quot;</span>);
          <span class="keywordflow">break</span>;
      };

<span class="comment">/* CFBF FAT entries */</span>
    ret = <a class="code" href="freexl_8h.html#ad6dbe072c7a4632853d90f4509bf3aee" title="Query general information about the Workbook and Worksheets.">freexl_get_info</a> (handle, <a name="a10"></a><a class="code" href="freexl_8h.html#a2fddf7ac8a59851091886e73f5a7579c" title="Information query for CFBF FAT entry count.">FREEXL_CFBF_FAT_COUNT</a>, &amp;fat_count);
    <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
      {
          fprintf (stderr, <span class="stringliteral">&quot;GET-INFO [FREEXL_CFBF_FAT_COUNT] Error: %d\n&quot;</span>, ret);
          <span class="keywordflow">goto</span> stop;
      }
    printf (<span class="stringliteral">&quot;CFBF FAT entries ....: %u\n&quot;</span>, fat_count);

<span class="comment">/* BIFF version */</span>
    ret = <a class="code" href="freexl_8h.html#ad6dbe072c7a4632853d90f4509bf3aee" title="Query general information about the Workbook and Worksheets.">freexl_get_info</a> (handle, <a name="a11"></a><a class="code" href="freexl_8h.html#a420a84d21b16eb3846802a127a43c42d" title="Information query for BIFF version.">FREEXL_BIFF_VERSION</a>, &amp;info);
    <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
      {
          fprintf (stderr, <span class="stringliteral">&quot;GET-INFO [FREEXL_BIFF_VERSION] Error: %d\n&quot;</span>, ret);
          <span class="keywordflow">goto</span> stop;
      }
    <span class="keywordflow">switch</span> (info)
      {
      <span class="keywordflow">case</span> <a name="a12"></a><a class="code" href="freexl_8h.html#a0aa21271ecd58c82fab2eb93a3e4e778" title="BIFF file is version 2.">FREEXL_BIFF_VER_2</a>:
          printf (<span class="stringliteral">&quot;BIFF Version ........: 2 [Excel 2.0]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a13"></a><a class="code" href="freexl_8h.html#af8ee55543be7efcb0a08e942bb9c63ad" title="BIFF file is version 3.">FREEXL_BIFF_VER_3</a>:
          printf (<span class="stringliteral">&quot;BIFF Version ........: 3 [Excel 3.0]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a14"></a><a class="code" href="freexl_8h.html#aa7fd3298f9126def31be4354faa22ef3" title="BIFF file is version 4.">FREEXL_BIFF_VER_4</a>:
          printf (<span class="stringliteral">&quot;BIFF Version ........: 4 [Excel 4.0]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a15"></a><a class="code" href="freexl_8h.html#af4f45932bd3d8676301376a9cbd4d3b3" title="BIFF file is version 5.">FREEXL_BIFF_VER_5</a>:
          printf (<span class="stringliteral">&quot;BIFF Version ........: 5 [Excel 5.0 / Excel 95]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a16"></a><a class="code" href="freexl_8h.html#a286de9c485064a4bc8aa7ad7e1f790d5" title="BIFF file is version 9.">FREEXL_BIFF_VER_8</a>:
          printf (<span class="stringliteral">&quot;BIFF Version ........: 8 [Excel 98/XP/2003/2007/2010]\n&quot;</span>);
          biff_v8 = 1;
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a class="code" href="freexl_8h.html#a1dc568df975757f9758273e459bf75aa" title="query is not applicable, or information is not available">FREEXL_UNKNOWN</a>:
          printf (<span class="stringliteral">&quot;BIFF Version ........: UNKNOWN\n&quot;</span>);
          <span class="keywordflow">break</span>;
      };

<span class="comment">/* BIFF max record size */</span>
    ret = <a class="code" href="freexl_8h.html#ad6dbe072c7a4632853d90f4509bf3aee" title="Query general information about the Workbook and Worksheets.">freexl_get_info</a> (handle, <a name="a17"></a><a class="code" href="freexl_8h.html#a46c9d6d08e13a91f90978032f1e6059c" title="Information query for BIFF maximum record size.">FREEXL_BIFF_MAX_RECSIZE</a>, &amp;info);
    <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
      {
          fprintf (stderr, <span class="stringliteral">&quot;GET-INFO [FREEXL_BIFF_MAX_RECSIZE] Error: %d\n&quot;</span>,
                   ret);
          <span class="keywordflow">goto</span> stop;
      }
    <span class="keywordflow">switch</span> (info)
      {
      <span class="keywordflow">case</span> <a name="a18"></a><a class="code" href="freexl_8h.html#a80ce4e2bcac32935b4a83ccd38203bb9" title="Maximum BIFF record size is 2080 bytes.">FREEXL_BIFF_MAX_RECSZ_2080</a>:
          printf (<span class="stringliteral">&quot;BIFF Max record size : 2080\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a19"></a><a class="code" href="freexl_8h.html#a5d5c17f39dbff003103cedba2d2ef7fe" title="Maximum BIFF record size is 8224 bytes.">FREEXL_BIFF_MAX_RECSZ_8224</a>:
          printf (<span class="stringliteral">&quot;BIFF Max record size : 8224\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a class="code" href="freexl_8h.html#a1dc568df975757f9758273e459bf75aa" title="query is not applicable, or information is not available">FREEXL_UNKNOWN</a>:
          printf (<span class="stringliteral">&quot;BIFF Max record size : UNKNOWN\n&quot;</span>);
          <span class="keywordflow">break</span>;
      };

<span class="comment">/* BIFF DateMode */</span>
    ret = <a class="code" href="freexl_8h.html#ad6dbe072c7a4632853d90f4509bf3aee" title="Query general information about the Workbook and Worksheets.">freexl_get_info</a> (handle, <a name="a20"></a><a class="code" href="freexl_8h.html#af75780148dd3de23a7d8f9735f327151" title="Information query for BIFF date mode.">FREEXL_BIFF_DATEMODE</a>, &amp;info);
    <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
      {
          fprintf (stderr, <span class="stringliteral">&quot;GET-INFO [FREEXL_BIFF_DATEMODE] Error: %d\n&quot;</span>, ret);
          <span class="keywordflow">goto</span> stop;
      }
    <span class="keywordflow">switch</span> (info)
      {
      <span class="keywordflow">case</span> <a name="a21"></a><a class="code" href="freexl_8h.html#a07ff7705b9d3392e07248bbd8db09c29" title="BIFF date mode starts at 1 Jan 1900.">FREEXL_BIFF_DATEMODE_1900</a>:
          printf (<span class="stringliteral">&quot;BIFF DateMode .......: 0 [day#1 = &#39;1900-01-01&#39;]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a22"></a><a class="code" href="freexl_8h.html#a866e98cd2303b5ace991c86354a2c438" title="BIFF date mode starts at 2 Jan 1904.">FREEXL_BIFF_DATEMODE_1904</a>:
          printf (<span class="stringliteral">&quot;BIFF DateMode .......: 1 [day#1 = &#39;1904-01-02&#39;]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a class="code" href="freexl_8h.html#a1dc568df975757f9758273e459bf75aa" title="query is not applicable, or information is not available">FREEXL_UNKNOWN</a>:
          printf (<span class="stringliteral">&quot;BIFF DateMode .......: UNKNOWN\n&quot;</span>);
          <span class="keywordflow">break</span>;
      };

<span class="comment">/* BIFF Obfuscated */</span>
    ret = <a class="code" href="freexl_8h.html#ad6dbe072c7a4632853d90f4509bf3aee" title="Query general information about the Workbook and Worksheets.">freexl_get_info</a> (handle, <a name="a23"></a><a class="code" href="freexl_8h.html#a67663a93d47aea78e01e9aa3ee95a7ff" title="Information query for BIFF password protection state.">FREEXL_BIFF_PASSWORD</a>, &amp;info);
    <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
      {
          fprintf (stderr, <span class="stringliteral">&quot;GET-INFO [FREEXL_BIFF_PASSWORD] Error: %d\n&quot;</span>, ret);
          <span class="keywordflow">goto</span> stop;
      }
    <span class="keywordflow">switch</span> (info)
      {
      <span class="keywordflow">case</span> <a name="a24"></a><a class="code" href="freexl_8h.html#a6a60c1c15710566dc4f7aff403fdd008" title="BIFF file is password protected.">FREEXL_BIFF_OBFUSCATED</a>:
          printf (<span class="stringliteral">&quot;BIFF Password/Crypted: YES, obfuscated (not accessible)\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a25"></a><a class="code" href="freexl_8h.html#a41d9788be3004120b9ec25add6481639" title="BIFF file is not password protected.">FREEXL_BIFF_PLAIN</a>:
          printf (<span class="stringliteral">&quot;BIFF Password/Crypted: NO, clear data\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a class="code" href="freexl_8h.html#a1dc568df975757f9758273e459bf75aa" title="query is not applicable, or information is not available">FREEXL_UNKNOWN</a>:
          printf (<span class="stringliteral">&quot;BIFF Password/Crypted: UNKNOWN\n&quot;</span>);
          <span class="keywordflow">break</span>;
      };

<span class="comment">/* BIFF CodePage */</span>
    ret = <a class="code" href="freexl_8h.html#ad6dbe072c7a4632853d90f4509bf3aee" title="Query general information about the Workbook and Worksheets.">freexl_get_info</a> (handle, <a name="a26"></a><a class="code" href="freexl_8h.html#a107460fac458e94b38fef2dfefb0eb6b" title="Information query for BIFF character encoding.">FREEXL_BIFF_CODEPAGE</a>, &amp;info);
    <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
      {
          fprintf (stderr, <span class="stringliteral">&quot;GET-INFO [FREEXL_BIFF_CODEPAGE] Error: %d\n&quot;</span>, ret);
          <span class="keywordflow">goto</span> stop;
      }
    <span class="keywordflow">switch</span> (info)
      {
      <span class="keywordflow">case</span> <a name="a27"></a><a class="code" href="freexl_8h.html#a522b2c2b720061eae56041d19d53eaa4" title="BIFF file uses plain ASCII encoding.">FREEXL_BIFF_ASCII</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: ASCII\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a28"></a><a class="code" href="freexl_8h.html#a69ed79915f93aa073f675fffe56ee944" title="BIFF file uses CP437 (OEM US format) encoding.">FREEXL_BIFF_CP437</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP437 [OEM United States]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a29"></a><a class="code" href="freexl_8h.html#a13a4ad38d830e7cd33964496543d8b9c" title="BIFF file uses CP720 (Arabic DOS format) encoding.">FREEXL_BIFF_CP720</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP720 [Arabic (DOS)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a30"></a><a class="code" href="freexl_8h.html#aca6cf8115f23ad43ab4c5d9a00d0acb0" title="BIFF file uses CP737 (Greek DOS format) encoding.">FREEXL_BIFF_CP737</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP737 [Greek (DOS)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a31"></a><a class="code" href="freexl_8h.html#ac7546f56ced5c3d7fae1cb5177548a6f" title="BIFF file uses CP775 (Baltic DOS format) encoding.">FREEXL_BIFF_CP775</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP775 [Baltic (DOS)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a32"></a><a class="code" href="freexl_8h.html#a4b7cbed2d22edd601bc9f1054561b403" title="BIFF file uses CP850 (Western Europe DOS format) encoding.">FREEXL_BIFF_CP850</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP850 [Western European (DOS)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a33"></a><a class="code" href="freexl_8h.html#a65e5f67ab62d4506204c74e44c33c96c" title="BIFF file uses CP852 (Central Europe DOS format) encoding.">FREEXL_BIFF_CP852</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP852 [Central European (DOS)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a34"></a><a class="code" href="freexl_8h.html#a637582d5503ec6a5f565cab50c09885d" title="BIFF file uses CP855 (OEM Cyrillic format) encoding.">FREEXL_BIFF_CP855</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP855 [OEM Cyrillic]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a35"></a><a class="code" href="freexl_8h.html#ab8939d66b49924f7487d874a88a5a464" title="BIFF file uses CP857 (Turkish DOS format) encoding.">FREEXL_BIFF_CP857</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP857 [Turkish (DOS)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a36"></a><a class="code" href="freexl_8h.html#a5999c031300a248b1a0a8fe88b0c4d4a" title="BIFF file uses CP858 (OEM Multiligual Latin 1 format) encoding.">FREEXL_BIFF_CP858</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP858 [OEM Multilingual Latin I]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a37"></a><a class="code" href="freexl_8h.html#ad7fd86b52bd93ca93c36bfeeec667732" title="BIFF file uses CP860 (Portuguese DOS format) encoding.">FREEXL_BIFF_CP860</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP860 [Portuguese (DOS)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a38"></a><a class="code" href="freexl_8h.html#ae8020132a25eef7bf48fa35d14ae6070" title="BIFF file uses CP861 (Icelandic DOS format) encoding.">FREEXL_BIFF_CP861</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP861 [Icelandic (DOS)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a39"></a><a class="code" href="freexl_8h.html#a7b0b5b567cf7bec35328a34ef9f20d04" title="BIFF file uses CP862 (Hebrew DOS format) encoding.">FREEXL_BIFF_CP862</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP862 [Hebrew (DOS)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a40"></a><a class="code" href="freexl_8h.html#a86624759a18858413006f619f3528caa" title="BIFF file uses CP863 (French Canadian DOS format) encoding.">FREEXL_BIFF_CP863</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP863 [French Canadian (DOS)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a41"></a><a class="code" href="freexl_8h.html#a9b86c93b9334dc89a9b5dd8557bd6622" title="BIFF file uses CP864 (Arabic DOS format) encoding.">FREEXL_BIFF_CP864</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP864 [Arabic (864)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a42"></a><a class="code" href="freexl_8h.html#a209e6510e6147694ae9be6af5b22666a" title="BIFF file uses CP865 (Nordic DOS format) encoding.">FREEXL_BIFF_CP865</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP865 [Nordic (DOS)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a43"></a><a class="code" href="freexl_8h.html#ab1cc954a11d62133c099162f278a55e0" title="BIFF file uses CP866 (Cyrillic DOS format) encoding.">FREEXL_BIFF_CP866</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP866 [Cyrillic (DOS)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a44"></a><a class="code" href="freexl_8h.html#ab723be1b62102df77f4cf729b1d2a8df" title="BIFF file uses CP869 (Modern Greek DOS format) encoding.">FREEXL_BIFF_CP869</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP869 [Greek, Modern (DOS)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a45"></a><a class="code" href="freexl_8h.html#a0e75c09334148dfece8ee2145acb22ca" title="BIFF file uses CP874 (Thai Windows format) encoding.">FREEXL_BIFF_CP874</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP874 [Thai (Windows)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a46"></a><a class="code" href="freexl_8h.html#a8e9c853af18e76fa6eb3082dcb07d47d" title="BIFF file uses CP932 (Shift JIS format) encoding.">FREEXL_BIFF_CP932</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP932 [Japanese (Shift-JIS)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a47"></a><a class="code" href="freexl_8h.html#a30e7bf84fe0fcacfffe9ae18955c1113" title="BIFF file uses CP936 (Simplified Chinese GB2312 format) encoding.">FREEXL_BIFF_CP936</a>:
          printf
              (<span class="stringliteral">&quot;BIFF CodePage .......: CP936 [Chinese Simplified (GB2312)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a48"></a><a class="code" href="freexl_8h.html#a61b2bacda25a7c78a4aa47ab254d5654" title="BIFF file uses CP949 (Korean) encoding.">FREEXL_BIFF_CP949</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP949 [Korean]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a49"></a><a class="code" href="freexl_8h.html#acd63f77d55ed9b4908488ca5eb86660b" title="BIFF file uses CP950 (Traditional Chinese Big5 format) encoding.">FREEXL_BIFF_CP950</a>:
          printf
              (<span class="stringliteral">&quot;BIFF CodePage .......: CP950 [Chinese Traditional (Big5)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a50"></a><a class="code" href="freexl_8h.html#aec63c1a736f3ee679fc7f56e4cfb4039" title="BIFF file uses Unicode (UTF-16LE format) encoding.">FREEXL_BIFF_UTF16LE</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: UTF-16LE [Unicode]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a51"></a><a class="code" href="freexl_8h.html#a21f7ca4d9205741ece6a51b4a0e4e9f5" title="BIFF file uses CP1250 (Central Europe Windows) encoding.">FREEXL_BIFF_CP1250</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP1250 [Windows Central Europe]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a52"></a><a class="code" href="freexl_8h.html#a691f98294537ce35275f31dc058f8dc3" title="BIFF file uses CP1251 (Cyrillic Windows) encoding.">FREEXL_BIFF_CP1251</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP1251 [Windows Cyrillic]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a53"></a><a class="code" href="freexl_8h.html#a3c28710b9242570cc5093b5bca5b4b37" title="BIFF file uses CP1252 (Windows Latin 1) encoding.">FREEXL_BIFF_CP1252</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP1252 [Windows Latin 1]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a54"></a><a class="code" href="freexl_8h.html#a5167946014a92bc6c802f4177f195614" title="BIFF file uses CP1252 (Windows Greek) encoding.">FREEXL_BIFF_CP1253</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP1253 [Windows Greek]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a55"></a><a class="code" href="freexl_8h.html#a456109ad4f4bb44534e2fd7dc24e906d" title="BIFF file uses CP1254 (Windows Turkish) encoding.">FREEXL_BIFF_CP1254</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP1254 [Windows Turkish]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a56"></a><a class="code" href="freexl_8h.html#a53b30bceb58c876a461f1bf7c72e6e36" title="BIFF file uses CP1255 (Windows Hebrew) encoding.">FREEXL_BIFF_CP1255</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP1255 [Windows Hebrew]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a57"></a><a class="code" href="freexl_8h.html#a86ac6376816c786cb683e7918b645a3a" title="BIFF file uses CP1256 (Windows Arabic) encoding.">FREEXL_BIFF_CP1256</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP1256 [Windows Arabic]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a58"></a><a class="code" href="freexl_8h.html#a02287574f2ae02928b0c8bbd09d1a356" title="BIFF file uses CP1257 (Windows Baltic) encoding.">FREEXL_BIFF_CP1257</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP1257 [Windows Baltic]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a59"></a><a class="code" href="freexl_8h.html#a62327e99b4fa7cffd3bfe815b4b4bb4e" title="BIFF file uses CP1258 (Windows Vietnamese) encoding.">FREEXL_BIFF_CP1258</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP1258 [Windows Vietnamese]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a60"></a><a class="code" href="freexl_8h.html#a7a9baf49b0beae695edddab0833b301b" title="BIFF file uses CP1361 (Korean Johab) encoding.">FREEXL_BIFF_CP1361</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: CP1361 [Korean (Johab)]\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a name="a61"></a><a class="code" href="freexl_8h.html#a33dedb29031d75f4a6f049ccfea4c13d" title="BIFF file uses Mac Roman encoding.">FREEXL_BIFF_MACROMAN</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: MacRoman\n&quot;</span>);
          <span class="keywordflow">break</span>;
      <span class="keywordflow">case</span> <a class="code" href="freexl_8h.html#a1dc568df975757f9758273e459bf75aa" title="query is not applicable, or information is not available">FREEXL_UNKNOWN</a>:
          printf (<span class="stringliteral">&quot;BIFF CodePage .......: UNKNOWN\n&quot;</span>);
          <span class="keywordflow">break</span>;
      };

<span class="comment">/* BIFF Worksheet entries */</span>
    ret = <a class="code" href="freexl_8h.html#ad6dbe072c7a4632853d90f4509bf3aee" title="Query general information about the Workbook and Worksheets.">freexl_get_info</a> (handle, <a name="a62"></a><a class="code" href="freexl_8h.html#a9586e48f1cd5f906fd6ee9a2295dbda6" title="Information query for BIFF sheet count.">FREEXL_BIFF_SHEET_COUNT</a>, &amp;worksheet_count);
    <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
      {
          fprintf (stderr, <span class="stringliteral">&quot;GET-INFO [FREEXL_BIFF_SHEET_COUNT] Error: %d\n&quot;</span>,
                   ret);
          <span class="keywordflow">goto</span> stop;
      }
    printf (<span class="stringliteral">&quot;BIFF Worksheets .....: %u\n&quot;</span>, worksheet_count);

    <span class="keywordflow">if</span> (biff_v8)
      {
          <span class="comment">/* BIFF SST entries */</span>
          ret = <a class="code" href="freexl_8h.html#ad6dbe072c7a4632853d90f4509bf3aee" title="Query general information about the Workbook and Worksheets.">freexl_get_info</a> (handle, <a name="a63"></a><a class="code" href="freexl_8h.html#ada166791eacffe082ec8db6b8ab30ee9" title="Information query for BIFF Single String Table entry count (BIFF8)">FREEXL_BIFF_STRING_COUNT</a>, &amp;sst_count);
          <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
            {
                fprintf (stderr,
                         <span class="stringliteral">&quot;GET-INFO [FREEXL_BIFF_STRING_COUNT] Error: %d\n&quot;</span>,
                         ret);
                <span class="keywordflow">goto</span> stop;
            }
          printf (<span class="stringliteral">&quot;BIFF SST entries ....: %u\n&quot;</span>, sst_count);
      }

<span class="comment">/* BIFF Format entries */</span>
    ret = <a class="code" href="freexl_8h.html#ad6dbe072c7a4632853d90f4509bf3aee" title="Query general information about the Workbook and Worksheets.">freexl_get_info</a> (handle, <a name="a64"></a><a class="code" href="freexl_8h.html#a7ab3c540cf7cfd1400324dde1e1a490b" title="Information query for BIFF format count.">FREEXL_BIFF_FORMAT_COUNT</a>, &amp;format_count);
    <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
      {
          fprintf (stderr, <span class="stringliteral">&quot;GET-INFO [FREEXL_BIFF_FORMAT_COUNT] Error: %d\n&quot;</span>,
                   ret);
          <span class="keywordflow">goto</span> stop;
      }
    printf (<span class="stringliteral">&quot;BIFF Formats ........: %u\n&quot;</span>, format_count);

<span class="comment">/* BIFF XF entries */</span>
    ret = <a class="code" href="freexl_8h.html#ad6dbe072c7a4632853d90f4509bf3aee" title="Query general information about the Workbook and Worksheets.">freexl_get_info</a> (handle, <a name="a65"></a><a class="code" href="freexl_8h.html#aff903b41ee45db759535fbe1e933e9ae" title="Information query for BIFF extended format count.">FREEXL_BIFF_XF_COUNT</a>, &amp;xf_count);
    <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
      {
          fprintf (stderr, <span class="stringliteral">&quot;GET-INFO [FREEXL_BIFF_XF_COUNT] Error: %d\n&quot;</span>, ret);
          <span class="keywordflow">goto</span> stop;
      }
    printf (<span class="stringliteral">&quot;BIFF eXtendedFormats : %u\n&quot;</span>, xf_count);

    printf
        (<span class="stringliteral">&quot;\nWorksheets:\n=========================================================\n&quot;</span>);
    <span class="keywordflow">for</span> (idx = 0; idx &lt; worksheet_count; idx++)
      {
          <span class="comment">/* printing BIFF Worksheets entries */</span>
          <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> active;
          <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> rows;
          <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> columns;

          ret = <a name="a66"></a><a class="code" href="freexl_8h.html#abba0c9d47eaba2ca2b8a093b03638219" title="Query worksheet name.">freexl_get_worksheet_name</a> (handle, idx, &amp;utf8_string);
          <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
            {
                fprintf (stderr, <span class="stringliteral">&quot;GET-WORKSHEET-NAME Error: %d\n&quot;</span>, ret);
                <span class="keywordflow">goto</span> stop;
            }
          <span class="keywordflow">if</span> (utf8_string == NULL)
              printf (<span class="stringliteral">&quot;%3u] NULL (unnamed)\n&quot;</span>, idx);
          <span class="keywordflow">else</span>
              printf (<span class="stringliteral">&quot;%3u] %s\n&quot;</span>, idx, utf8_string);
          ret = <a name="a67"></a><a class="code" href="freexl_8h.html#a248e690e125ee15eddacb25aa72b07a3" title="Set the currently active worksheets.">freexl_select_active_worksheet</a> (handle, idx);
          <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
            {
                fprintf (stderr, <span class="stringliteral">&quot;SELECT-ACTIVE_WORKSHEET Error: %d\n&quot;</span>, ret);
                <span class="keywordflow">goto</span> stop;
            }
          ret = <a name="a68"></a><a class="code" href="freexl_8h.html#ae6683eb98a9d01c745db397878d9933a" title="Query the currently active worksheet index.">freexl_get_active_worksheet</a> (handle, &amp;active);
          <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
            {
                fprintf (stderr, <span class="stringliteral">&quot;GET-ACTIVE_WORKSHEET Error: %d\n&quot;</span>, ret);
                <span class="keywordflow">goto</span> stop;
            }
          printf
              (<span class="stringliteral">&quot;\tok, Worksheet successfully selected: currently active: %u\n&quot;</span>,
               active);
          ret = <a name="a69"></a><a class="code" href="freexl_8h.html#ace1d7e39a8874a9300821c22e5bb9643" title="Query worksheet dimensions.">freexl_worksheet_dimensions</a> (handle, &amp;rows, &amp;columns);
          <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
            {
                fprintf (stderr, <span class="stringliteral">&quot;WORKSHEET-DIMENSIONS Error: %d\n&quot;</span>, ret);
                <span class="keywordflow">goto</span> stop;
            }
          printf (<span class="stringliteral">&quot;\t%u Rows X %u Columns\n\n&quot;</span>, rows, columns);
      }

    <span class="keywordflow">if</span> (!verbose)
        <span class="keywordflow">goto</span> stop;

    <span class="keywordflow">if</span> (biff_v8)
      {
          <span class="comment">/* printing BIFF SST entries */</span>
          printf
              (<span class="stringliteral">&quot;\nSST [Shared String Table]:\n=========================================================\n&quot;</span>);
          <span class="keywordflow">for</span> (idx = 0; idx &lt; sst_count; idx++)
            {
                ret = <a name="a70"></a><a class="code" href="freexl_8h.html#af63ae08d341f25957601b7adc4fbeb33" title="Retrieve string entries from SST.">freexl_get_SST_string</a> (handle, idx, &amp;utf8_string);
                <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
                  {
                      fprintf (stderr, <span class="stringliteral">&quot;GET-SST-STRING Error: %d\n&quot;</span>, ret);
                      <span class="keywordflow">goto</span> stop;
                  }
                <span class="keywordflow">if</span> (utf8_string == NULL)
                    printf (<span class="stringliteral">&quot;%8u] NULL (empty string)\n&quot;</span>, idx);
                <span class="keywordflow">else</span>
                    printf (<span class="stringliteral">&quot;%8u] %s\n&quot;</span>, idx, utf8_string);
            }
      }

    printf
        (<span class="stringliteral">&quot;\nFAT entries [File Allocation Table]:\n=========================================================\n&quot;</span>);
    <span class="keywordflow">for</span> (idx = 0; idx &lt; fat_count; idx++)
      {
          <span class="comment">/* printing each FAT entry */</span>
          ret = <a name="a71"></a><a class="code" href="freexl_8h.html#a9b68b6e59ee6ca4d3303f812dbefe679" title="Retrieve FAT entries from FAT chain.">freexl_get_FAT_entry</a> (handle, idx, &amp;next_sector);
          <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
            {
                fprintf (stderr, <span class="stringliteral">&quot;GET-FAT-ENTRY Error: %d\n&quot;</span>, ret);
                <span class="keywordflow">goto</span> stop;
            }
          <span class="keywordflow">if</span> (next_sector == 0xffffffff)
              printf (<span class="stringliteral">&quot;%8u -&gt; 0xffffffff FREESECT\n&quot;</span>, idx);
          <span class="keywordflow">else</span> <span class="keywordflow">if</span> (next_sector == 0xfffffffe)
              printf (<span class="stringliteral">&quot;%8u -&gt; 0xfffffffe ENDOFCHAIN\n&quot;</span>, idx);
          <span class="keywordflow">else</span> <span class="keywordflow">if</span> (next_sector == 0xfffffffd)
              printf (<span class="stringliteral">&quot;%8u -&gt; 0xfffffffe FATSECT\n&quot;</span>, idx);
          <span class="keywordflow">else</span> <span class="keywordflow">if</span> (next_sector == 0xfffffffc)
              printf (<span class="stringliteral">&quot;%8u -&gt; 0xfffffffe DIFSECT\n&quot;</span>, idx);
          <span class="keywordflow">else</span>
              printf (<span class="stringliteral">&quot;%8u -&gt; %8u\n&quot;</span>, idx, next_sector);
      }

  stop:
<span class="comment">/* closing the .XLS file [Workbook] */</span>
    ret = <a name="a72"></a><a class="code" href="freexl_8h.html#a6122b2adf513c42a8ad5aa0e083a82bb" title="Close the .xls file and releasing any allocated resource.">freexl_close</a> (handle);
    <span class="keywordflow">if</span> (ret != <a class="code" href="freexl_8h.html#aefcbd53004ebb5ce8f727c3d4f3ce43e" title="No error, success.">FREEXL_OK</a>)
      {
          fprintf (stderr, <span class="stringliteral">&quot;CLOSE ERROR: %d\n&quot;</span>, ret);
          <span class="keywordflow">return</span> -1;
      }

    <span class="keywordflow">return</span> 0;
}
</pre></div> </div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated on Fri Jan 13 2012 for FreeXL by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>