1 /*
2 / freexl.h
3 /
4 / public declarations
5 /
6 / version  1.0, 2011 July 26
7 /
8 / Author: Sandro Furieri a.furieri@lqt.it
9 /
10 / ------------------------------------------------------------------------------
11 /
12 / Version: MPL 1.1/GPL 2.0/LGPL 2.1
13 /
14 / The contents of this file are subject to the Mozilla Public License Version
15 / 1.1 (the "License"); you may not use this file except in compliance with
16 / the License. You may obtain a copy of the License at
17 / http://www.mozilla.org/MPL/
18 /
19 / Software distributed under the License is distributed on an "AS IS" basis,
20 / WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
21 / for the specific language governing rights and limitations under the
22 / License.
23 /
24 / The Original Code is the FreeXL library
25 /
26 / The Initial Developer of the Original Code is Alessandro Furieri
27 /
28 / Portions created by the Initial Developer are Copyright (C) 2011
29 / the Initial Developer. All Rights Reserved.
30 /
31 / Contributor(s):
32 / Brad Hards
33 /
34 / Alternatively, the contents of this file may be used under the terms of
35 / either the GNU General Public License Version 2 or later (the "GPL"), or
36 / the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
37 / in which case the provisions of the GPL or the LGPL are applicable instead
38 / of those above. If you wish to allow use of your version of this file only
39 / under the terms of either the GPL or the LGPL, and not to allow others to
40 / use your version of this file under the terms of the MPL, indicate your
41 / decision by deleting the provisions above and replace them with the notice
42 / and other provisions required by the GPL or the LGPL. If you do not delete
43 / the provisions above, a recipient may use your version of this file under
44 / the terms of any one of the MPL, the GPL or the LGPL.
45 /
46 */
47 
48 /**
49  \file freexl.h
50 
51  Function declarations and constants for FreeXL library
52  */
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
54 #ifdef DLL_EXPORT
55 #define FREEXL_DECLARE __declspec(dllexport)
56 #else
57 #define FREEXL_DECLARE extern
58 #endif
59 #endif
60 
61 #ifndef _FREEXL_H
62 #ifndef DOXYGEN_SHOULD_SKIP_THIS
63 #define _FREEXL_H
64 #endif
65 
66 #ifdef __cplusplus
67 extern "C"
68 {
69 #endif
70 
71 /* constants */
72 /** query is not applicable, or information is not available */
73 #define FREEXL_UNKNOWN			0
74 
75 /* CFBF constants */
76 /** CFBF file is version 3 */
77 #define FREEXL_CFBF_VER_3		3
78 /** CFBF file is version 4 */
79 #define FREEXL_CFBF_VER_4		4
80 
81 /** CFBF file uses 512 byte sectors */
82 #define FREEXL_CFBF_SECTOR_512		512
83 /** CFBF file uses 4096 (4K) sectors */
84 #define FREEXL_CFBF_SECTOR_4096		4096
85 
86 /* BIFF versions */
87 /** BIFF file is version 2 */
88 #define FREEXL_BIFF_VER_2		2
89 /** BIFF file is version 3 */
90 #define FREEXL_BIFF_VER_3		3
91 /** BIFF file is version 4 */
92 #define FREEXL_BIFF_VER_4		4
93 /** BIFF file is version 5 */
94 #define FREEXL_BIFF_VER_5		5
95 /** BIFF file is version 9 */
96 #define FREEXL_BIFF_VER_8		8
97 
98 /* BIFF MaxRecordSize */
99 /** Maximum BIFF record size is 2080 bytes */
100 #define FREEXL_BIFF_MAX_RECSZ_2080	2080
101 /** Maximum BIFF record size is 8224 bytes */
102 #define FREEXL_BIFF_MAX_RECSZ_8224	8224
103 
104 /* BIFF DateMode */
105 /** BIFF date mode starts at 1 Jan 1900 */
106 #define FREEXL_BIFF_DATEMODE_1900	1900
107 /** BIFF date mode starts at 2 Jan 1904 */
108 #define FREEXL_BIFF_DATEMODE_1904	1904
109 
110 /* BIFF Obsfuscated */
111 /** BIFF file is password protected */
112 #define FREEXL_BIFF_OBFUSCATED		3003
113 /** BIFF file is not password protected */
114 #define FREEXL_BIFF_PLAIN		3004
115 
116 /* BIFF CodePage */
117 /** BIFF file uses plain ASCII encoding */
118 #define FREEXL_BIFF_ASCII		0x016F
119 /** BIFF file uses CP437 (OEM US format) encoding */
120 #define FREEXL_BIFF_CP437		0x01B5
121 /** BIFF file uses CP720 (Arabic DOS format) encoding */
122 #define FREEXL_BIFF_CP720		0x02D0
123 /** BIFF file uses CP737 (Greek DOS format) encoding */
124 #define FREEXL_BIFF_CP737		0x02E1
125 /** BIFF file uses CP775 (Baltic DOS format) encoding */
126 #define FREEXL_BIFF_CP775		0x0307
127 /** BIFF file uses CP850 (Western Europe DOS format) encoding */
128 #define FREEXL_BIFF_CP850		0x0352
129 /** BIFF file uses CP852 (Central Europe DOS format) encoding */
130 #define FREEXL_BIFF_CP852		0x0354
131 /** BIFF file uses CP855 (OEM Cyrillic format) encoding */
132 #define FREEXL_BIFF_CP855		0x0357
133 /** BIFF file uses CP857 (Turkish DOS format) encoding */
134 #define FREEXL_BIFF_CP857		0x0359
135 /** BIFF file uses CP858 (OEM Multiligual Latin 1 format) encoding */
136 #define FREEXL_BIFF_CP858		0x035A
137 /** BIFF file uses CP860 (Portuguese DOS format) encoding */
138 #define FREEXL_BIFF_CP860		0x035C
139 /** BIFF file uses CP861 (Icelandic DOS format) encoding */
140 #define FREEXL_BIFF_CP861		0x035D
141 /** BIFF file uses CP862 (Hebrew DOS format) encoding */
142 #define FREEXL_BIFF_CP862		0x035E
143 /** BIFF file uses CP863 (French Canadian DOS format) encoding */
144 #define FREEXL_BIFF_CP863		0x035F
145 /** BIFF file uses CP864 (Arabic DOS format) encoding */
146 #define FREEXL_BIFF_CP864		0x0360
147 /** BIFF file uses CP865 (Nordic DOS format) encoding */
148 #define FREEXL_BIFF_CP865		0x0361
149 /** BIFF file uses CP866 (Cyrillic DOS format) encoding */
150 #define FREEXL_BIFF_CP866		0x0362
151 /** BIFF file uses CP869 (Modern Greek DOS format) encoding */
152 #define FREEXL_BIFF_CP869		0x0365
153 /** BIFF file uses CP874 (Thai Windows format) encoding */
154 #define FREEXL_BIFF_CP874		0x036A
155 /** BIFF file uses CP932 (Shift JIS format) encoding */
156 #define FREEXL_BIFF_CP932		0x03A4
157 /** BIFF file uses CP936 (Simplified Chinese GB2312 format) encoding */
158 #define FREEXL_BIFF_CP936		0x03A8
159 /** BIFF file uses CP949 (Korean) encoding */
160 #define FREEXL_BIFF_CP949		0x03B5
161 /** BIFF file uses CP950 (Traditional Chinese Big5 format) encoding */
162 #define FREEXL_BIFF_CP950		0x03B6
163 /** BIFF file uses Unicode (UTF-16LE format) encoding */
164 #define FREEXL_BIFF_UTF16LE		0x04B0
165 /** BIFF file uses CP1250 (Central Europe Windows) encoding */
166 #define FREEXL_BIFF_CP1250		0x04E2
167 /** BIFF file uses CP1251 (Cyrillic Windows) encoding */
168 #define FREEXL_BIFF_CP1251		0x04E3
169 /** BIFF file uses CP1252 (Windows Latin 1) encoding */
170 #define FREEXL_BIFF_CP1252		0x04E4
171 /** BIFF file uses CP1252 (Windows Greek) encoding */
172 #define FREEXL_BIFF_CP1253		0x04E5
173 /** BIFF file uses CP1254 (Windows Turkish) encoding */
174 #define FREEXL_BIFF_CP1254		0x04E6
175 /** BIFF file uses CP1255 (Windows Hebrew) encoding */
176 #define FREEXL_BIFF_CP1255		0x04E7
177 /** BIFF file uses CP1256 (Windows Arabic) encoding */
178 #define FREEXL_BIFF_CP1256		0x04E8
179 /** BIFF file uses CP1257 (Windows Baltic) encoding */
180 #define FREEXL_BIFF_CP1257		0x04E9
181 /** BIFF file uses CP1258 (Windows Vietnamese) encoding */
182 #define FREEXL_BIFF_CP1258		0x04EA
183 /** BIFF file uses CP1361 (Korean Johab) encoding */
184 #define FREEXL_BIFF_CP1361		0x0551
185 /** BIFF file uses Mac Roman encoding */
186 #define FREEXL_BIFF_MACROMAN		0x2710
187 
188 /* CELL VALUE Types */
189 /** Cell has no value (empty cell) */
190 #define FREEXL_CELL_NULL		101
191 /** Cell contains an integer value */
192 #define FREEXL_CELL_INT			102
193 /** Cell contains a floating point number */
194 #define FREEXL_CELL_DOUBLE		103
195 /** Cell contains a text value */
196 #define FREEXL_CELL_TEXT		104
197 /** Cell contains a reference to a Single String Table entry (BIFF8) */
198 #define FREEXL_CELL_SST_TEXT		105
199 /** Cell contains a number intended to represent a date */
200 #define FREEXL_CELL_DATE		106
201 /** Cell contains a number intended to represent a date and time */
202 #define FREEXL_CELL_DATETIME		107
203 /** Cell contains a number intended to represent a time */
204 #define FREEXL_CELL_TIME		108
205 
206 /* INFO params */
207 /** Information query for CFBF version */
208 #define FREEXL_CFBF_VERSION		32001
209 /** Information query for CFBF sector size */
210 #define FREEXL_CFBF_SECTOR_SIZE		32002
211 /** Information query for CFBF FAT entry count */
212 #define FREEXL_CFBF_FAT_COUNT		32003
213 /** Information query for BIFF version */
214 #define FREEXL_BIFF_VERSION		32005
215 /** Information query for BIFF maximum record size */
216 #define FREEXL_BIFF_MAX_RECSIZE		32006
217 /** Information query for BIFF date mode */
218 #define FREEXL_BIFF_DATEMODE		32007
219 /** Information query for BIFF password protection state */
220 #define FREEXL_BIFF_PASSWORD		32008
221 /** Information query for BIFF character encoding */
222 #define FREEXL_BIFF_CODEPAGE		32009
223 /** Information query for BIFF sheet count */
224 #define FREEXL_BIFF_SHEET_COUNT		32010
225 /** Information query for BIFF Single String Table entry count (BIFF8) */
226 #define FREEXL_BIFF_STRING_COUNT	32011
227 /** Information query for BIFF format count */
228 #define FREEXL_BIFF_FORMAT_COUNT	32012
229 /** Information query for BIFF extended format count */
230 #define FREEXL_BIFF_XF_COUNT		32013
231 
232 /* Error codes */
233 #define FREEXL_OK			0 /**< No error, success */
234 #define FREEXL_FILE_NOT_FOUND		-1 /**< .xls file does not exist or is
235 						not accessible for reading */
236 #define FREEXL_NULL_HANDLE		-2 /**< Null xls_handle argument */
237 #define FREEXL_INVALID_HANDLE		-3 /**< Invalid xls_handle argument */
238 #define FREEXL_INSUFFICIENT_MEMORY	-4 /**< some kind of memory allocation
239                                                 failure */
240 #define FREEXL_NULL_ARGUMENT		-5 /**< an unexpected null argument */
241 #define FREEXL_INVALID_INFO_ARG		-6 /**< invalid "what" parameter */
242 #define FREEXL_INVALID_CFBF_HEADER	-7 /**< the .xls file does not contain a
243                                                 valid CFBF header */
244 #define FREEXL_CFBF_READ_ERROR		-8 /**< Read error. Usually indicates a
245                                                 corrupt or invalid .xls file */
246 #define FREEXL_CFBF_SEEK_ERROR		-9 /**< Seek error. Usually indicates a
247                                                 corrupt or invalid .xls file */
248 #define FREEXL_CFBF_INVALID_SIGNATURE	-10 /**< The .xls file does contain a
249                                                  CFBF header, but the header is
250                                                  broken or corrupted in some way
251                                                  */
252 #define FREEXL_CFBF_INVALID_SECTOR_SIZE	-11 /**< The .xls file does contain a
253                                                  CFBF header, but the header is
254                                                  broken or corrupted in some way
255                                                  */
256 #define FREEXL_CFBF_EMPTY_FAT_CHAIN	-12 /**< The .xls file does contain a
257                                                  CFBF header, but the header is
258                                                  broken or corrupted in some way
259                                                  */
260 #define FREEXL_CFBF_ILLEGAL_FAT_ENTRY	-13 /**< The file contains an invalid
261                                                  File Allocation Table record */
262 #define FREEXL_BIFF_INVALID_BOF		-14 /**< The file contains an invalid
263                                                  BIFF format entry */
264 #define FREEXL_BIFF_INVALID_SST		-15 /**< The file contains an invalid
265                                                  Single String Table */
266 #define FREEXL_BIFF_ILLEGAL_SST_INDEX	-16 /**< The requested Single String
267                                                  Table entry is not available */
268 #define FREEXL_BIFF_WORKBOOK_NOT_FOUND	-17 /**< BIFF does not contain a valid
269                                                  workbook */
270 #define FREEXL_BIFF_ILLEGAL_SHEET_INDEX	-18 /**< The requested worksheet is not
271                                                  available in the workbook */
272 #define FREEXL_BIFF_UNSELECTED_SHEET	-19 /**< There is no currently active
273                                               worksheet. Possibly a forgotten
274                                               call to
275                                               freexl_select_active_worksheet()
276                                              */
277 #define FREEXL_INVALID_CHARACTER	-20 /**< Charset conversion detected an
278                                                  illegal character (not within
279                                                  the declared charset) */
280 #define FREEXL_UNSUPPORTED_CHARSET	-21 /**< The requested charset
281                                                  conversion is not available. */
282 #define FREEXL_ILLEGAL_CELL_ROW_COL	-22 /**< The requested cell is outside
283                                                  the valid range for the sheet*/
284 #define FREEXL_ILLEGAL_RK_VALUE		-23 /**< Conversion of the RK value
285                                                  failed. Possibly a corrupt file
286                                                  or a bug in FreeXL. */
287 #define FREEXL_ILLEGAL_MULRK_VALUE	-23 /**< Conversion of the MULRK value
288                                                  failed. Possibly a corrupt file
289                                                  or a bug in FreeXL. */
290 #define FREEXL_INVALID_MINI_STREAM	-24 /**< The MiniFAT stream is invalid.
291                                                  Possibly a corrupt file. */
292 #define FREEXL_CFBF_ILLEGAL_MINI_FAT_ENTRY	-25 /**< The MiniFAT stream
293                                                      contains an invalid entry.
294                                                      Possibly a corrupt file. */
295 #define FREEXL_CRAFTED_FILE			-26 /**< A severely corrupted file
296                                                  (may be purposely crafted for
297                                                  malicious purposes) has been
298                                                  detected. */
299 
300 
301     /**
302      Container for a cell value
303 
304      freexl_get_cell_value() takes a pointer to this structure, and fills
305      in the appropriate values.
306 
307      \code
308 	FreeXL_CellValue val;
309 	freexl_get_cell_value(..., &val);
310 	switch (val.type)
311 	{
312 	    case FREEXL_CELL_INT:
313 		printf("Int=%d\n", val.value.int_value;
314 		break;
315 	    case FREEXL_CELL_DOUBLE:
316 		printf("Double=%1.2f\n", val.value.double_value;
317 		break;
318 	    case FREEXL_CELL_TEXT:
319 	    case FREEXL_CELL_SST_TEXT:
320 		printf("Text='%s'\n", val.value.text_value;
321 		break;
322 	    case FREEXL_CELL_DATE:
323 	    case FREEXL_CELL_DATETIME:
324 	    case FREEXL_CELL_TIME:
325 		printf("DateOrTime='%s'\n", val.value.text_value;
326 		break;
327 	    case FREEXL_CELL_NULL:
328 		printf("NULL\n");
329 		break;
330 	    default:
331 		printf("Invalid data-type\n");
332 		break;
333 	}
334      \endcode
335      */
336     struct FreeXL_CellValue_str
337     {
338 	/**
339 	 The type of data stored in this cell. Can be one of the following:
340 	 - FREEXL_CELL_NULL the cell contains a NULL value.
341 	 - FREEXL_CELL_INT the cell contains an INTEGER value.
342 	 - FREEXL_CELL_DOUBLE the cell contains a DOUBLE value.
343 	 - FREEXL_CELL_TEXT or FREEXL_CELL_SST_TEXT the cell contains a text
344 	 string (always UTF-8 encoded)
345 	 - FREEXL_CELL_DATE the cell contains a date, encoded as a 'YYYY-MM-DD'
346 	 string value
347 	 - FREEXL_CELL_DATETIME the cell contains a date and time, encoded as a
348 	 'YYYY-MM-DD HH:MM:SS' string value
349 	 - FREEXL_CELL_TIME the cell contains a time, encoded as a 'HH:MM:SS'
350 	 string value
351 	 */
352 	unsigned char type;
353 	union
354 	{
355 	    int int_value; /**< if type is FREEXL_CELL_INT, then the
356 	    corresponding value will be returned as int_value */
357 	    double double_value; /**< if type is FREEXL_CELL_DOUBLE, then the
358 	    corresponding value will be returned as double_value */
359 	    const char *text_value; /**< if type is FREEXL_CELL_TEXT,
360 	    FREEXL_CELL_SST_TEXT, FREEXL_CELL_DATE, FREEXL_CELL_DATETIME or
361 	    FREEXL_CELL_TIME the corresponding value will be returned as
362 	    text_value */
363 	} value; /**< The value of the data stored in the cell. Which part of
364 	              the union is valid is determined by the type value. */
365     };
366 
367     /**
368      Typedef for cell value structure.
369 
370      \sa FreeXL_CellValue_str
371      */
372     typedef struct FreeXL_CellValue_str FreeXL_CellValue;
373 
374 
375     /**
376      Return the current library version.
377 
378      \return the version string.
379      */
380     FREEXL_DECLARE const char *freexl_version (void);
381 
382     /**
383      Open the .xls file, preparing for future functions
384 
385      \param path full or relative pathname of the input .xls file.
386      \param xls_handle an opaque reference (handle) to be used in each
387      subsequent function (return value).
388 
389      \return FREEXL_OK will be returned on success, otherwise any appropriate
390      error code on failure.
391 
392      \note You are expected to freexl_close() even on failure, so as to
393      correctly release any dynamic memory allocation.
394      */
395     FREEXL_DECLARE int freexl_open (const char *path, const void **xls_handle);
396 
397     /**
398      Open the .xls file for metadata query only
399 
400      This is similar to freexl_open(), except that an abbreviated parsing
401      step is performed. This makes it faster, but does not support queries
402      for cell values.
403 
404      \param path full or relative pathname of the input .xls file.
405      \param xls_handle an opaque reference (handle) to be used in each
406      subsequent function (return value).
407 
408      \return FREEXL_OK will be returned on success, otherwise any appropriate
409      error code on failure.
410 
411      \note You are expected to freexl_close() even on failure, so as to
412      correctly release any dynamic memory allocation.
413      */
414     FREEXL_DECLARE int freexl_open_info (const char *path,
415 					 const void **xls_handle);
416 
417     /**
418      Close the .xls file and releasing any allocated resource
419 
420     \param xls_handle the handle previously returned by freexl_open()
421 
422     \return FREEXL_OK will be returned on success
423 
424     \note After calling freexl_close() any related resource will be released,
425     and the handle will no longer be valid.
426     */
427     FREEXL_DECLARE int freexl_close (const void *xls_handle);
428 
429     /**
430      Query general information about the Workbook and Worksheets
431 
432      \param xls_handle the handle previously returned by freexl_open()
433      \param what the info to be queried.
434      \param info the corresponding information value (return value)
435 
436      \note FREEXL_UNKNOWN will be returned in \p info if the information is
437      not available, not appropriate or not supported for the file type.
438 
439      \return FREEXL_OK will be returned on success
440 
441     Valid values for \p what are:
442     - FREEXL_CFBF_VERSION (returning FREEXL_CFBF_VER_3 or FREEXL_CFBF_VER_4)
443     - FREEXL_CFBF_SECTOR_SIZE (returning FREEXL_CFBF_SECTOR_512 or
444     FREEXL_CFBF_SECTOR_4096)
445     - FREEXL_CFBF_FAT_COUNT (returning the total count of FAT entries in the
446     file)
447     - FREEXL_BIFF_VERSION (return one of FREEXL_BIFF_VER_2, FREEXL_BIFF_VER_3,
448     FREEXL_BIFF_VER_4, FREEXL_BIFF_VER_5, FREEXL_BIFF_VER_8)
449     - FREEXL_BIFF_MAX_RECSIZE (returning FREEXL_BIFF_MAX_RECSZ_2080 or
450     FREEXL_BIFF_MAX_RECSZ_8224)
451     - FREEXL_BIFF_DATEMODE (returning FREEXL_BIFF_DATEMODE_1900 or
452     FREEXL_BIFF_DATEMODE_1904)
453     - FREEXL_BIFF_PASSWORD (returning FREEXL_BIFF_OBFUSCATED or
454     FREEXL_BIFF_PLAIN)
455     - FREEXL_BIFF_CODEPAGE (returning FREEXL_BIFF_ASCII, one of
456     FREEXL_BIFF_CP*,FREEXL_BIFF_UTF16LE
457     or FREEXL_BIFF_MACROMAN)
458     - FREEXL_BIFF_SHEET_COUNT (returning the total number of worksheets)
459     - FREEXL_BIFF_STRING_COUNT (returning the total number of Single String
460     Table entries)
461     - FREEXL_BIFF_FORMAT_COUNT (returning the total number of format entries)
462     - FREEXL_BIFF_XF_COUNT (returning the number of extended format entries)
463     */
464     FREEXL_DECLARE int freexl_get_info (const void *xls_handle,
465 					unsigned short what,
466 					unsigned int *info);
467 
468     /**
469      Query worksheet name
470 
471     \param xls_handle the handle previously returned by freexl_open()
472     \param sheet_index the index identifying the worksheet (base 0)
473     \param string the name of the worksheet (return value)
474 
475     \return FREEXL_OK will be returned on success
476     */
477     FREEXL_DECLARE int freexl_get_worksheet_name (const void *xls_handle,
478 						  unsigned short sheet_index,
479 						  const char **string);
480 
481     /**
482      Set the currently active worksheets
483 
484      Within a FreeXL handle, only one worksheet can be active at a time.
485      Functions that fetch data are implictly working on the selected worksheet.
486 
487      \param xls_handle the handle previously returned by freexl_open()
488      \param sheet_index the index identifying the worksheet (base 0)
489 
490      \return FREEXL_OK will be returned on success
491      */
492     FREEXL_DECLARE int freexl_select_active_worksheet (const void *xls_handle,
493 						       unsigned short
494 						       sheet_index);
495 
496     /**
497      Query the currently active worksheet index
498 
499      \param xls_handle the handle previously returned by freexl_open()
500      \param sheet_index the index corresponding to the currently active
501      Worksheet (return value)
502 
503      \return FREEXL_OK will be returned on success
504 
505      \sa freexl_select_active_worksheet() for how to select the worksheet
506     */
507     FREEXL_DECLARE int freexl_get_active_worksheet (const void *xls_handle,
508 						    unsigned short
509 						    *sheet_index);
510 
511     /**
512      Query worksheet dimensions
513 
514      This function returns the number of rows and columns for the currently
515      selected worksheet.
516 
517      \param xls_handle the handle previously returned by freexl_open()
518      \param rows the total row count (return value)
519      \param columns the total column count (return value)
520 
521      \return FREEXL_OK will be returned on success
522 
523      \note Worksheet dimensions are zero based, so if you
524      have a worksheet that is four columns and two rows (i.e. from A1 in the
525      top left corner to B4 in the bottom right corner), this will return rows
526      equal to 1 and columns equal to 3). This is to support C style looping.
527      */
528     FREEXL_DECLARE int freexl_worksheet_dimensions (const void *xls_handle,
529 						    unsigned int *rows,
530 						    unsigned short *columns);
531 
532     /**
533      Retrieve string entries from SST
534 
535      \param xls_handle the handle previously returned by freexl_open()
536      \param string_index the index identifying the String entry (base 0).
537      \param string the corresponding String value (return value)
538 
539      \return FREEXL_OK will be returned on success
540 
541      \note This function is not normally required, since freexl_get_cell_value
542      will return the string where appropriate. It is mainly intended for
543      debugging purposes.
544 
545     */
546     FREEXL_DECLARE int freexl_get_SST_string (const void *xls_handle,
547 					      unsigned short string_index,
548 					      const char **string);
549 
550     /**
551      Retrieve FAT entries from FAT chain
552 
553      \param xls_handle the handle previously returned by freexl_open()
554      \param sector_index the index identifying the Sector entry (base 0).
555      \param next_sector_index the index identifying the next Sector to be
556      accessed in logical order (return value).
557 
558      \note The following values imply special meaning:
559      - 0xffffffff free / unused sector
560      - 0xfffffffe end of chain
561      - 0xfffffffd sector used by FAT (map of sectors)
562      - 0xfffffffc double-indirect FAT sector (map of FAT sectors)
563 
564      \return FREEXL_OK will be returned on success
565 
566      \note This function is not normally required, since FreeXL will handle
567      FAT table entries transparent to the user. It is mainly intended for
568      debugging purposes.
569 
570      */
571     FREEXL_DECLARE int freexl_get_FAT_entry (const void *xls_handle,
572 					     unsigned int sector_index,
573 					     unsigned int *next_sector_index);
574 
575     /**
576      Retrieve individual cell values from the currently active worksheet
577 
578      \param xls_handle the handle previously returned by freexl_open()
579      \param row row number of the cell to query (zero base)
580      \param column column number of the cell to query (zero base)
581      \param value the cell type and value (return value)
582 
583      \return FREEXL_OK will be returned on success
584     */
585     FREEXL_DECLARE int freexl_get_cell_value (const void *xls_handle,
586 					      unsigned int row,
587 					      unsigned short column,
588 					      FreeXL_CellValue * value);
589 
590 #ifdef __cplusplus
591 }
592 #endif
593 
594 #endif				/* _FREEXL_H */
595