FreeXL 1.0.5
test_xl.c

test_xl.c is a simple demonstration and diagnostic tool for the Excel (.xls) file format.This sample code provides an example of:

Here is an example of a typical run:

./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

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.

# ./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

For more information, or to aid with debugging, you can specify a -verbose flag, as shown in this example:

# ./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 -> 0xfffffffe FATSECT
       1 -> 0xffffffff FREESECT
       2 ->        3
       3 ->        4
...      
      36 ->       37
      37 ->       38
      38 -> 0xfffffffe ENDOFCHAIN
      39 -> 0xfffffffe ENDOFCHAIN
      40 ->       41
      41 -> 0xfffffffe ENDOFCHAIN
      42 ->       43
      43 -> 0xfffffffe ENDOFCHAIN
      44 -> 0xffffffff FREESECT
...
     127 -> 0xffffffff FREESECT
/*
/ test_xl.c
/
/ FreeXL Sample code
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ ------------------------------------------------------------------------------
/
/ Version: MPL 1.1/GPL 2.0/LGPL 2.1
/
/ The contents of this file are subject to the Mozilla Public License Version
/ 1.1 (the "License"); you may not use this file except in compliance with
/ the License. You may obtain a copy of the License at
/ http://www.mozilla.org/MPL/
/
/ Software distributed under the License is distributed on an "AS IS" basis,
/ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
/ for the specific language governing rights and limitations under the
/ License.
/
/ The Original Code is the FreeXL library
/
/ The Initial Developer of the Original Code is Alessandro Furieri
/
/ Portions created by the Initial Developer are Copyright (C) 2011
/ the Initial Developer. All Rights Reserved.
/
/ Contributor(s):
/ Brad Hards
/
/ Alternatively, the contents of this file may be used under the terms of
/ either the GNU General Public License Version 2 or later (the "GPL"), or
/ the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
/ in which case the provisions of the GPL or the LGPL are applicable instead
/ of those above. If you wish to allow use of your version of this file only
/ under the terms of either the GPL or the LGPL, and not to allow others to
/ use your version of this file under the terms of the MPL, indicate your
/ decision by deleting the provisions above and replace them with the notice
/ and other provisions required by the GPL or the LGPL. If you do not delete
/ the provisions above, a recipient may use your version of this file under
/ the terms of any one of the MPL, the GPL or the LGPL.
/
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "freexl.h"
int
main (int argc, char *argv[])
{
const void *handle;
int ret;
unsigned int info;
unsigned int fat_count;
unsigned int sst_count;
unsigned int worksheet_count;
unsigned int format_count;
unsigned int xf_count;
unsigned int idx;
unsigned int next_sector;
int biff_v8 = 0;
const char *utf8_string;
int verbose = 0;
if (argc == 2 || argc == 3)
{
if (argc == 3)
{
if (strcmp (argv[2], "-verbose") == 0)
verbose = 1;
}
}
else
{
fprintf (stderr, "usage: text_xl path.xls [-verbose]\n");
return -1;
}
/* opening the .XLS file [Workbook] */
ret = freexl_open (argv[1], &handle);
if (ret != FREEXL_OK)
{
fprintf (stderr, "OPEN ERROR: %d\n", ret);
return -1;
}
/*
* reporting .XLS information
*/
printf ("\nExcel document: %s\n", argv[1]);
printf ("==========================================================\n");
/* CFBF version */
ret = freexl_get_info (handle, FREEXL_CFBF_VERSION, &info);
if (ret != FREEXL_OK)
{
fprintf (stderr, "GET-INFO [FREEXL_CFBF_VERSION] Error: %d\n", ret);
goto stop;
}
switch (info)
{
printf ("CFBF Version ........: 3\n");
break;
printf ("CFBF Version ........: 4\n");
break;
printf ("CFBF Version ........: UNKNOWN\n");
break;
};
/* CFBF sector size */
ret = freexl_get_info (handle, FREEXL_CFBF_SECTOR_SIZE, &info);
if (ret != FREEXL_OK)
{
fprintf (stderr, "GET-INFO [FREEXL_CFBF_SECTOR_SIZE] Error: %d\n",
ret);
goto stop;
}
switch (info)
{
printf ("CFBF Sector size ....: 512\n");
break;
printf ("CFBF Sector size ....: 4096\n");
break;
printf ("CFBF Sector size ....: UNKNOWN\n");
break;
};
/* CFBF FAT entries */
ret = freexl_get_info (handle, FREEXL_CFBF_FAT_COUNT, &fat_count);
if (ret != FREEXL_OK)
{
fprintf (stderr, "GET-INFO [FREEXL_CFBF_FAT_COUNT] Error: %d\n", ret);
goto stop;
}
printf ("CFBF FAT entries ....: %u\n", fat_count);
/* BIFF version */
ret = freexl_get_info (handle, FREEXL_BIFF_VERSION, &info);
if (ret != FREEXL_OK)
{
fprintf (stderr, "GET-INFO [FREEXL_BIFF_VERSION] Error: %d\n", ret);
goto stop;
}
switch (info)
{
printf ("BIFF Version ........: 2 [Excel 2.0]\n");
break;
printf ("BIFF Version ........: 3 [Excel 3.0]\n");
break;
printf ("BIFF Version ........: 4 [Excel 4.0]\n");
break;
printf ("BIFF Version ........: 5 [Excel 5.0 / Excel 95]\n");
break;
printf ("BIFF Version ........: 8 [Excel 98/XP/2003/2007/2010]\n");
biff_v8 = 1;
break;
printf ("BIFF Version ........: UNKNOWN\n");
break;
};
/* BIFF max record size */
ret = freexl_get_info (handle, FREEXL_BIFF_MAX_RECSIZE, &info);
if (ret != FREEXL_OK)
{
fprintf (stderr, "GET-INFO [FREEXL_BIFF_MAX_RECSIZE] Error: %d\n",
ret);
goto stop;
}
switch (info)
{
printf ("BIFF Max record size : 2080\n");
break;
printf ("BIFF Max record size : 8224\n");
break;
printf ("BIFF Max record size : UNKNOWN\n");
break;
};
/* BIFF DateMode */
ret = freexl_get_info (handle, FREEXL_BIFF_DATEMODE, &info);
if (ret != FREEXL_OK)
{
fprintf (stderr, "GET-INFO [FREEXL_BIFF_DATEMODE] Error: %d\n", ret);
goto stop;
}
switch (info)
{
printf ("BIFF DateMode .......: 0 [day#1 = '1900-01-01']\n");
break;
printf ("BIFF DateMode .......: 1 [day#1 = '1904-01-02']\n");
break;
printf ("BIFF DateMode .......: UNKNOWN\n");
break;
};
/* BIFF Obfuscated */
ret = freexl_get_info (handle, FREEXL_BIFF_PASSWORD, &info);
if (ret != FREEXL_OK)
{
fprintf (stderr, "GET-INFO [FREEXL_BIFF_PASSWORD] Error: %d\n", ret);
goto stop;
}
switch (info)
{
printf ("BIFF Password/Crypted: YES, obfuscated (not accessible)\n");
break;
printf ("BIFF Password/Crypted: NO, clear data\n");
break;
printf ("BIFF Password/Crypted: UNKNOWN\n");
break;
};
/* BIFF CodePage */
ret = freexl_get_info (handle, FREEXL_BIFF_CODEPAGE, &info);
if (ret != FREEXL_OK)
{
fprintf (stderr, "GET-INFO [FREEXL_BIFF_CODEPAGE] Error: %d\n", ret);
goto stop;
}
switch (info)
{
printf ("BIFF CodePage .......: ASCII\n");
break;
printf ("BIFF CodePage .......: CP437 [OEM United States]\n");
break;
printf ("BIFF CodePage .......: CP720 [Arabic (DOS)]\n");
break;
printf ("BIFF CodePage .......: CP737 [Greek (DOS)]\n");
break;
printf ("BIFF CodePage .......: CP775 [Baltic (DOS)]\n");
break;
printf ("BIFF CodePage .......: CP850 [Western European (DOS)]\n");
break;
printf ("BIFF CodePage .......: CP852 [Central European (DOS)]\n");
break;
printf ("BIFF CodePage .......: CP855 [OEM Cyrillic]\n");
break;
printf ("BIFF CodePage .......: CP857 [Turkish (DOS)]\n");
break;
printf ("BIFF CodePage .......: CP858 [OEM Multilingual Latin I]\n");
break;
printf ("BIFF CodePage .......: CP860 [Portuguese (DOS)]\n");
break;
printf ("BIFF CodePage .......: CP861 [Icelandic (DOS)]\n");
break;
printf ("BIFF CodePage .......: CP862 [Hebrew (DOS)]\n");
break;
printf ("BIFF CodePage .......: CP863 [French Canadian (DOS)]\n");
break;
printf ("BIFF CodePage .......: CP864 [Arabic (864)]\n");
break;
printf ("BIFF CodePage .......: CP865 [Nordic (DOS)]\n");
break;
printf ("BIFF CodePage .......: CP866 [Cyrillic (DOS)]\n");
break;
printf ("BIFF CodePage .......: CP869 [Greek, Modern (DOS)]\n");
break;
printf ("BIFF CodePage .......: CP874 [Thai (Windows)]\n");
break;
printf ("BIFF CodePage .......: CP932 [Japanese (Shift-JIS)]\n");
break;
printf
("BIFF CodePage .......: CP936 [Chinese Simplified (GB2312)]\n");
break;
printf ("BIFF CodePage .......: CP949 [Korean]\n");
break;
printf
("BIFF CodePage .......: CP950 [Chinese Traditional (Big5)]\n");
break;
printf ("BIFF CodePage .......: UTF-16LE [Unicode]\n");
break;
printf ("BIFF CodePage .......: CP1250 [Windows Central Europe]\n");
break;
printf ("BIFF CodePage .......: CP1251 [Windows Cyrillic]\n");
break;
printf ("BIFF CodePage .......: CP1252 [Windows Latin 1]\n");
break;
printf ("BIFF CodePage .......: CP1253 [Windows Greek]\n");
break;
printf ("BIFF CodePage .......: CP1254 [Windows Turkish]\n");
break;
printf ("BIFF CodePage .......: CP1255 [Windows Hebrew]\n");
break;
printf ("BIFF CodePage .......: CP1256 [Windows Arabic]\n");
break;
printf ("BIFF CodePage .......: CP1257 [Windows Baltic]\n");
break;
printf ("BIFF CodePage .......: CP1258 [Windows Vietnamese]\n");
break;
printf ("BIFF CodePage .......: CP1361 [Korean (Johab)]\n");
break;
printf ("BIFF CodePage .......: MacRoman\n");
break;
printf ("BIFF CodePage .......: UNKNOWN\n");
break;
};
/* BIFF Worksheet entries */
ret = freexl_get_info (handle, FREEXL_BIFF_SHEET_COUNT, &worksheet_count);
if (ret != FREEXL_OK)
{
fprintf (stderr, "GET-INFO [FREEXL_BIFF_SHEET_COUNT] Error: %d\n",
ret);
goto stop;
}
printf ("BIFF Worksheets .....: %u\n", worksheet_count);
if (biff_v8)
{
/* BIFF SST entries */
ret = freexl_get_info (handle, FREEXL_BIFF_STRING_COUNT, &sst_count);
if (ret != FREEXL_OK)
{
fprintf (stderr,
"GET-INFO [FREEXL_BIFF_STRING_COUNT] Error: %d\n",
ret);
goto stop;
}
printf ("BIFF SST entries ....: %u\n", sst_count);
}
/* BIFF Format entries */
ret = freexl_get_info (handle, FREEXL_BIFF_FORMAT_COUNT, &format_count);
if (ret != FREEXL_OK)
{
fprintf (stderr, "GET-INFO [FREEXL_BIFF_FORMAT_COUNT] Error: %d\n",
ret);
goto stop;
}
printf ("BIFF Formats ........: %u\n", format_count);
/* BIFF XF entries */
ret = freexl_get_info (handle, FREEXL_BIFF_XF_COUNT, &xf_count);
if (ret != FREEXL_OK)
{
fprintf (stderr, "GET-INFO [FREEXL_BIFF_XF_COUNT] Error: %d\n", ret);
goto stop;
}
printf ("BIFF eXtendedFormats : %u\n", xf_count);
printf
("\nWorksheets:\n=========================================================\n");
for (idx = 0; idx < worksheet_count; idx++)
{
/* printing BIFF Worksheets entries */
unsigned short active;
unsigned int rows;
unsigned short columns;
ret = freexl_get_worksheet_name (handle, idx, &utf8_string);
if (ret != FREEXL_OK)
{
fprintf (stderr, "GET-WORKSHEET-NAME Error: %d\n", ret);
goto stop;
}
if (utf8_string == NULL)
printf ("%3u] NULL (unnamed)\n", idx);
else
printf ("%3u] %s\n", idx, utf8_string);
ret = freexl_select_active_worksheet (handle, idx);
if (ret != FREEXL_OK)
{
fprintf (stderr, "SELECT-ACTIVE_WORKSHEET Error: %d\n", ret);
goto stop;
}
ret = freexl_get_active_worksheet (handle, &active);
if (ret != FREEXL_OK)
{
fprintf (stderr, "GET-ACTIVE_WORKSHEET Error: %d\n", ret);
goto stop;
}
printf
("\tok, Worksheet successfully selected: currently active: %u\n",
active);
ret = freexl_worksheet_dimensions (handle, &rows, &columns);
if (ret != FREEXL_OK)
{
fprintf (stderr, "WORKSHEET-DIMENSIONS Error: %d\n", ret);
goto stop;
}
printf ("\t%u Rows X %u Columns\n\n", rows, columns);
}
if (!verbose)
goto stop;
if (biff_v8)
{
/* printing BIFF SST entries */
printf
("\nSST [Shared String Table]:\n=========================================================\n");
for (idx = 0; idx < sst_count; idx++)
{
ret = freexl_get_SST_string (handle, idx, &utf8_string);
if (ret != FREEXL_OK)
{
fprintf (stderr, "GET-SST-STRING Error: %d\n", ret);
goto stop;
}
if (utf8_string == NULL)
printf ("%8u] NULL (empty string)\n", idx);
else
printf ("%8u] %s\n", idx, utf8_string);
}
}
printf
("\nFAT entries [File Allocation Table]:\n=========================================================\n");
for (idx = 0; idx < fat_count; idx++)
{
/* printing each FAT entry */
ret = freexl_get_FAT_entry (handle, idx, &next_sector);
if (ret != FREEXL_OK)
{
fprintf (stderr, "GET-FAT-ENTRY Error: %d\n", ret);
goto stop;
}
if (next_sector == 0xffffffff)
printf ("%8u -> 0xffffffff FREESECT\n", idx);
else if (next_sector == 0xfffffffe)
printf ("%8u -> 0xfffffffe ENDOFCHAIN\n", idx);
else if (next_sector == 0xfffffffd)
printf ("%8u -> 0xfffffffe FATSECT\n", idx);
else if (next_sector == 0xfffffffc)
printf ("%8u -> 0xfffffffe DIFSECT\n", idx);
else
printf ("%8u -> %8u\n", idx, next_sector);
}
stop:
/* closing the .XLS file [Workbook] */
ret = freexl_close (handle);
if (ret != FREEXL_OK)
{
fprintf (stderr, "CLOSE ERROR: %d\n", ret);
return -1;
}
return 0;
}
Function declarations and constants for FreeXL library.
#define FREEXL_BIFF_CP1257
BIFF file uses CP1257 (Windows Baltic) encoding.
Definition: freexl.h:180
#define FREEXL_BIFF_DATEMODE_1900
BIFF date mode starts at 1 Jan 1900.
Definition: freexl.h:106
#define FREEXL_BIFF_VER_2
BIFF file is version 2.
Definition: freexl.h:88
#define FREEXL_BIFF_CP874
BIFF file uses CP874 (Thai Windows format) encoding.
Definition: freexl.h:154
#define FREEXL_BIFF_CODEPAGE
Information query for BIFF character encoding.
Definition: freexl.h:222
#define FREEXL_BIFF_CP720
BIFF file uses CP720 (Arabic DOS format) encoding.
Definition: freexl.h:122
#define FREEXL_UNKNOWN
query is not applicable, or information is not available
Definition: freexl.h:73
#define FREEXL_BIFF_CP865
BIFF file uses CP865 (Nordic DOS format) encoding.
Definition: freexl.h:148
#define FREEXL_BIFF_CP1250
BIFF file uses CP1250 (Central Europe Windows) encoding.
Definition: freexl.h:166
FREEXL_DECLARE int freexl_select_active_worksheet(const void *xls_handle, unsigned short sheet_index)
Set the currently active worksheets.
#define FREEXL_BIFF_VER_8
BIFF file is version 9.
Definition: freexl.h:96
#define FREEXL_CFBF_VER_4
CFBF file is version 4.
Definition: freexl.h:79
#define FREEXL_CFBF_FAT_COUNT
Information query for CFBF FAT entry count.
Definition: freexl.h:212
#define FREEXL_BIFF_CP936
BIFF file uses CP936 (Simplified Chinese GB2312 format) encoding.
Definition: freexl.h:158
#define FREEXL_BIFF_MACROMAN
BIFF file uses Mac Roman encoding.
Definition: freexl.h:186
#define FREEXL_BIFF_CP1252
BIFF file uses CP1252 (Windows Latin 1) encoding.
Definition: freexl.h:170
#define FREEXL_BIFF_PLAIN
BIFF file is not password protected.
Definition: freexl.h:114
#define FREEXL_BIFF_VERSION
Information query for BIFF version.
Definition: freexl.h:214
#define FREEXL_BIFF_CP1254
BIFF file uses CP1254 (Windows Turkish) encoding.
Definition: freexl.h:174
#define FREEXL_BIFF_MAX_RECSIZE
Information query for BIFF maximum record size.
Definition: freexl.h:216
#define FREEXL_BIFF_CP850
BIFF file uses CP850 (Western Europe DOS format) encoding.
Definition: freexl.h:128
#define FREEXL_BIFF_CP1253
BIFF file uses CP1252 (Windows Greek) encoding.
Definition: freexl.h:172
#define FREEXL_BIFF_ASCII
BIFF file uses plain ASCII encoding.
Definition: freexl.h:118
#define FREEXL_BIFF_CP1255
BIFF file uses CP1255 (Windows Hebrew) encoding.
Definition: freexl.h:176
#define FREEXL_BIFF_CP858
BIFF file uses CP858 (OEM Multiligual Latin 1 format) encoding.
Definition: freexl.h:136
#define FREEXL_BIFF_MAX_RECSZ_8224
Maximum BIFF record size is 8224 bytes.
Definition: freexl.h:102
FREEXL_DECLARE int freexl_close(const void *xls_handle)
Close the .xls file and releasing any allocated resource.
#define FREEXL_BIFF_CP949
BIFF file uses CP949 (Korean) encoding.
Definition: freexl.h:160
#define FREEXL_BIFF_CP1258
BIFF file uses CP1258 (Windows Vietnamese) encoding.
Definition: freexl.h:182
#define FREEXL_BIFF_CP855
BIFF file uses CP855 (OEM Cyrillic format) encoding.
Definition: freexl.h:132
#define FREEXL_BIFF_CP852
BIFF file uses CP852 (Central Europe DOS format) encoding.
Definition: freexl.h:130
#define FREEXL_BIFF_PASSWORD
Information query for BIFF password protection state.
Definition: freexl.h:220
#define FREEXL_BIFF_CP1251
BIFF file uses CP1251 (Cyrillic Windows) encoding.
Definition: freexl.h:168
#define FREEXL_BIFF_CP437
BIFF file uses CP437 (OEM US format) encoding.
Definition: freexl.h:120
#define FREEXL_BIFF_OBFUSCATED
BIFF file is password protected.
Definition: freexl.h:112
#define FREEXL_CFBF_SECTOR_SIZE
Information query for CFBF sector size.
Definition: freexl.h:210
#define FREEXL_BIFF_CP1361
BIFF file uses CP1361 (Korean Johab) encoding.
Definition: freexl.h:184
#define FREEXL_BIFF_FORMAT_COUNT
Information query for BIFF format count.
Definition: freexl.h:228
#define FREEXL_BIFF_CP862
BIFF file uses CP862 (Hebrew DOS format) encoding.
Definition: freexl.h:142
#define FREEXL_BIFF_MAX_RECSZ_2080
Maximum BIFF record size is 2080 bytes.
Definition: freexl.h:100
#define FREEXL_BIFF_CP863
BIFF file uses CP863 (French Canadian DOS format) encoding.
Definition: freexl.h:144
#define FREEXL_BIFF_DATEMODE_1904
BIFF date mode starts at 2 Jan 1904.
Definition: freexl.h:108
#define FREEXL_BIFF_CP1256
BIFF file uses CP1256 (Windows Arabic) encoding.
Definition: freexl.h:178
#define FREEXL_BIFF_CP932
BIFF file uses CP932 (Shift JIS format) encoding.
Definition: freexl.h:156
#define FREEXL_BIFF_SHEET_COUNT
Information query for BIFF sheet count.
Definition: freexl.h:224
FREEXL_DECLARE int freexl_get_FAT_entry(const void *xls_handle, unsigned int sector_index, unsigned int *next_sector_index)
Retrieve FAT entries from FAT chain.
#define FREEXL_BIFF_CP864
BIFF file uses CP864 (Arabic DOS format) encoding.
Definition: freexl.h:146
#define FREEXL_BIFF_VER_4
BIFF file is version 4.
Definition: freexl.h:92
#define FREEXL_BIFF_CP866
BIFF file uses CP866 (Cyrillic DOS format) encoding.
Definition: freexl.h:150
#define FREEXL_BIFF_CP869
BIFF file uses CP869 (Modern Greek DOS format) encoding.
Definition: freexl.h:152
#define FREEXL_BIFF_CP857
BIFF file uses CP857 (Turkish DOS format) encoding.
Definition: freexl.h:134
FREEXL_DECLARE int freexl_get_worksheet_name(const void *xls_handle, unsigned short sheet_index, const char **string)
Query worksheet name.
#define FREEXL_BIFF_CP775
BIFF file uses CP775 (Baltic DOS format) encoding.
Definition: freexl.h:126
#define FREEXL_CFBF_VER_3
CFBF file is version 3.
Definition: freexl.h:77
#define FREEXL_CFBF_SECTOR_512
CFBF file uses 512 byte sectors.
Definition: freexl.h:82
#define FREEXL_BIFF_CP737
BIFF file uses CP737 (Greek DOS format) encoding.
Definition: freexl.h:124
FREEXL_DECLARE int freexl_open(const char *path, const void **xls_handle)
Open the .xls file, preparing for future functions.
#define FREEXL_BIFF_CP950
BIFF file uses CP950 (Traditional Chinese Big5 format) encoding.
Definition: freexl.h:162
FREEXL_DECLARE int freexl_worksheet_dimensions(const void *xls_handle, unsigned int *rows, unsigned short *columns)
Query worksheet dimensions.
FREEXL_DECLARE int freexl_get_info(const void *xls_handle, unsigned short what, unsigned int *info)
Query general information about the Workbook and Worksheets.
#define FREEXL_BIFF_CP860
BIFF file uses CP860 (Portuguese DOS format) encoding.
Definition: freexl.h:138
#define FREEXL_BIFF_STRING_COUNT
Information query for BIFF Single String Table entry count (BIFF8)
Definition: freexl.h:226
FREEXL_DECLARE int freexl_get_active_worksheet(const void *xls_handle, unsigned short *sheet_index)
Query the currently active worksheet index.
#define FREEXL_CFBF_SECTOR_4096
CFBF file uses 4096 (4K) sectors.
Definition: freexl.h:84
#define FREEXL_BIFF_CP861
BIFF file uses CP861 (Icelandic DOS format) encoding.
Definition: freexl.h:140
#define FREEXL_CFBF_VERSION
Information query for CFBF version.
Definition: freexl.h:208
#define FREEXL_BIFF_UTF16LE
BIFF file uses Unicode (UTF-16LE format) encoding.
Definition: freexl.h:164
#define FREEXL_OK
No error, success.
Definition: freexl.h:233
#define FREEXL_BIFF_VER_5
BIFF file is version 5.
Definition: freexl.h:94
FREEXL_DECLARE int freexl_get_SST_string(const void *xls_handle, unsigned short string_index, const char **string)
Retrieve string entries from SST.
#define FREEXL_BIFF_DATEMODE
Information query for BIFF date mode.
Definition: freexl.h:218
#define FREEXL_BIFF_VER_3
BIFF file is version 3.
Definition: freexl.h:90
#define FREEXL_BIFF_XF_COUNT
Information query for BIFF extended format count.
Definition: freexl.h:230