00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00053 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00054 #ifdef DLL_EXPORT
00055 #define FREEXL_DECLARE __declspec(dllexport)
00056 #else
00057 #define FREEXL_DECLARE extern
00058 #endif
00059 #endif
00060
00061 #ifndef _FREEXL_H
00062 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00063 #define _FREEXL_H
00064 #endif
00065
00066 #ifdef __cplusplus
00067 extern "C"
00068 {
00069 #endif
00070
00071
00073 #define FREEXL_UNKNOWN 0
00074
00075
00077 #define FREEXL_CFBF_VER_3 3
00078
00079 #define FREEXL_CFBF_VER_4 4
00080
00082 #define FREEXL_CFBF_SECTOR_512 512
00083
00084 #define FREEXL_CFBF_SECTOR_4096 4096
00085
00086
00088 #define FREEXL_BIFF_VER_2 2
00089
00090 #define FREEXL_BIFF_VER_3 3
00091
00092 #define FREEXL_BIFF_VER_4 4
00093
00094 #define FREEXL_BIFF_VER_5 5
00095
00096 #define FREEXL_BIFF_VER_8 8
00097
00098
00100 #define FREEXL_BIFF_MAX_RECSZ_2080 2080
00101
00102 #define FREEXL_BIFF_MAX_RECSZ_8224 8224
00103
00104
00106 #define FREEXL_BIFF_DATEMODE_1900 1900
00107
00108 #define FREEXL_BIFF_DATEMODE_1904 1904
00109
00110
00112 #define FREEXL_BIFF_OBFUSCATED 3003
00113
00114 #define FREEXL_BIFF_PLAIN 3004
00115
00116
00118 #define FREEXL_BIFF_ASCII 0x016F
00119
00120 #define FREEXL_BIFF_CP437 0x01B5
00121
00122 #define FREEXL_BIFF_CP720 0x02D0
00123
00124 #define FREEXL_BIFF_CP737 0x02E1
00125
00126 #define FREEXL_BIFF_CP775 0x0307
00127
00128 #define FREEXL_BIFF_CP850 0x0352
00129
00130 #define FREEXL_BIFF_CP852 0x0354
00131
00132 #define FREEXL_BIFF_CP855 0x0357
00133
00134 #define FREEXL_BIFF_CP857 0x0359
00135
00136 #define FREEXL_BIFF_CP858 0x035A
00137
00138 #define FREEXL_BIFF_CP860 0x035C
00139
00140 #define FREEXL_BIFF_CP861 0x035D
00141
00142 #define FREEXL_BIFF_CP862 0x035E
00143
00144 #define FREEXL_BIFF_CP863 0x035F
00145
00146 #define FREEXL_BIFF_CP864 0x0360
00147
00148 #define FREEXL_BIFF_CP865 0x0361
00149
00150 #define FREEXL_BIFF_CP866 0x0362
00151
00152 #define FREEXL_BIFF_CP869 0x0365
00153
00154 #define FREEXL_BIFF_CP874 0x036A
00155
00156 #define FREEXL_BIFF_CP932 0x03A4
00157
00158 #define FREEXL_BIFF_CP936 0x03A8
00159
00160 #define FREEXL_BIFF_CP949 0x03B5
00161
00162 #define FREEXL_BIFF_CP950 0x03B6
00163
00164 #define FREEXL_BIFF_UTF16LE 0x04B0
00165
00166 #define FREEXL_BIFF_CP1250 0x04E2
00167
00168 #define FREEXL_BIFF_CP1251 0x04E3
00169
00170 #define FREEXL_BIFF_CP1252 0x04E4
00171
00172 #define FREEXL_BIFF_CP1253 0x04E5
00173
00174 #define FREEXL_BIFF_CP1254 0x04E6
00175
00176 #define FREEXL_BIFF_CP1255 0x04E7
00177
00178 #define FREEXL_BIFF_CP1256 0x04E8
00179
00180 #define FREEXL_BIFF_CP1257 0x04E9
00181
00182 #define FREEXL_BIFF_CP1258 0x04EA
00183
00184 #define FREEXL_BIFF_CP1361 0x0551
00185
00186 #define FREEXL_BIFF_MACROMAN 0x2710
00187
00188
00190 #define FREEXL_CELL_NULL 101
00191
00192 #define FREEXL_CELL_INT 102
00193
00194 #define FREEXL_CELL_DOUBLE 103
00195
00196 #define FREEXL_CELL_TEXT 104
00197
00198 #define FREEXL_CELL_SST_TEXT 105
00199
00200 #define FREEXL_CELL_DATE 106
00201
00202 #define FREEXL_CELL_DATETIME 107
00203
00204 #define FREEXL_CELL_TIME 108
00205
00206
00208 #define FREEXL_CFBF_VERSION 32001
00209
00210 #define FREEXL_CFBF_SECTOR_SIZE 32002
00211
00212 #define FREEXL_CFBF_FAT_COUNT 32003
00213
00214 #define FREEXL_BIFF_VERSION 32005
00215
00216 #define FREEXL_BIFF_MAX_RECSIZE 32006
00217
00218 #define FREEXL_BIFF_DATEMODE 32007
00219
00220 #define FREEXL_BIFF_PASSWORD 32008
00221
00222 #define FREEXL_BIFF_CODEPAGE 32009
00223
00224 #define FREEXL_BIFF_SHEET_COUNT 32010
00225
00226 #define FREEXL_BIFF_STRING_COUNT 32011
00227
00228 #define FREEXL_BIFF_FORMAT_COUNT 32012
00229
00230 #define FREEXL_BIFF_XF_COUNT 32013
00231
00232
00233 #define FREEXL_OK 0
00234 #define FREEXL_FILE_NOT_FOUND -1
00236 #define FREEXL_NULL_HANDLE -2
00237 #define FREEXL_INVALID_HANDLE -3
00238 #define FREEXL_INSUFFICIENT_MEMORY -4
00240 #define FREEXL_NULL_ARGUMENT -5
00241 #define FREEXL_INVALID_INFO_ARG -6
00242 #define FREEXL_INVALID_CFBF_HEADER -7
00244 #define FREEXL_CFBF_READ_ERROR -8
00246 #define FREEXL_CFBF_SEEK_ERROR -9
00248 #define FREEXL_CFBF_INVALID_SIGNATURE -10
00252 #define FREEXL_CFBF_INVALID_SECTOR_SIZE -11
00256 #define FREEXL_CFBF_EMPTY_FAT_CHAIN -12
00260 #define FREEXL_CFBF_ILLEGAL_FAT_ENTRY -13
00262 #define FREEXL_BIFF_INVALID_BOF -14
00264 #define FREEXL_BIFF_INVALID_SST -15
00266 #define FREEXL_BIFF_ILLEGAL_SST_INDEX -16
00268 #define FREEXL_BIFF_WORKBOOK_NOT_FOUND -17
00270 #define FREEXL_BIFF_ILLEGAL_SHEET_INDEX -18
00272 #define FREEXL_BIFF_UNSELECTED_SHEET -19
00277 #define FREEXL_INVALID_CHARACTER -20
00280 #define FREEXL_UNSUPPORTED_CHARSET -21
00282 #define FREEXL_ILLEGAL_CELL_ROW_COL -22
00284 #define FREEXL_ILLEGAL_RK_VALUE -23
00287 #define FREEXL_ILLEGAL_MULRK_VALUE -23
00290 #define FREEXL_INVALID_MINI_STREAM -24
00292 #define FREEXL_CFBF_ILLEGAL_MINI_FAT_ENTRY -25
00295 #define FREEXL_CRAFTED_FILE -26
00336 struct FreeXL_CellValue_str
00337 {
00352 unsigned char type;
00353 union
00354 {
00355 int int_value;
00357 double double_value;
00359 const char *text_value;
00363 } value;
00365 };
00366
00372 typedef struct FreeXL_CellValue_str FreeXL_CellValue;
00373
00374
00380 FREEXL_DECLARE const char *freexl_version (void);
00381
00395 FREEXL_DECLARE int freexl_open (const char *path, const void **xls_handle);
00396
00414 FREEXL_DECLARE int freexl_open_info (const char *path,
00415 const void **xls_handle);
00416
00427 FREEXL_DECLARE int freexl_close (const void *xls_handle);
00428
00464 FREEXL_DECLARE int freexl_get_info (const void *xls_handle,
00465 unsigned short what,
00466 unsigned int *info);
00467
00477 FREEXL_DECLARE int freexl_get_worksheet_name (const void *xls_handle,
00478 unsigned short sheet_index,
00479 const char **string);
00480
00492 FREEXL_DECLARE int freexl_select_active_worksheet (const void *xls_handle,
00493 unsigned short
00494 sheet_index);
00495
00507 FREEXL_DECLARE int freexl_get_active_worksheet (const void *xls_handle,
00508 unsigned short
00509 *sheet_index);
00510
00528 FREEXL_DECLARE int freexl_worksheet_dimensions (const void *xls_handle,
00529 unsigned int *rows,
00530 unsigned short *columns);
00531
00546 FREEXL_DECLARE int freexl_get_SST_string (const void *xls_handle,
00547 unsigned short string_index,
00548 const char **string);
00549
00571 FREEXL_DECLARE int freexl_get_FAT_entry (const void *xls_handle,
00572 unsigned int sector_index,
00573 unsigned int *next_sector_index);
00574
00585 FREEXL_DECLARE int freexl_get_cell_value (const void *xls_handle,
00586 unsigned int row,
00587 unsigned short column,
00588 FreeXL_CellValue * value);
00589
00590 #ifdef __cplusplus
00591 }
00592 #endif
00593
00594 #endif