36 #ifndef INCLUDED_XLSXIO_READ_H 37 #define INCLUDED_XLSXIO_READ_H 40 #if defined(_MSC_VER) && _MSC_VER < 1600 41 typedef signed __int64 int64_t;
42 typedef unsigned __int64 uint64_t;
50 #if defined(XML_UNICODE_WCHAR_T) 51 #warning Building with XML_UNICODE_WCHAR_T and -fshort-wchar is not supported unless all other linked libraries and programs are also compiled with -fshort-wchar 52 #elif !defined(XML_UNICODE) 53 #define XLSXIOCHAR char 56 #define XLSXIOCHAR wchar_t 61 #ifndef DLL_EXPORT_XLSXIO 63 #if defined(BUILD_XLSXIO_DLL) || defined(BUILD_XLSXIO_SHARED) || defined(xlsxio_write_SHARED_EXPORTS) 64 #define DLL_EXPORT_XLSXIO __declspec(dllexport) 65 #elif !defined(STATIC) && !defined(BUILD_XLSXIO_STATIC) && !defined(BUILD_XLSXIO) 66 #define DLL_EXPORT_XLSXIO __declspec(dllimport) 68 #define DLL_EXPORT_XLSXIO 71 #define DLL_EXPORT_XLSXIO 152 #define XLSXIOREAD_SKIP_NONE 0 154 #define XLSXIOREAD_SKIP_EMPTY_ROWS 0x01 156 #define XLSXIOREAD_SKIP_EMPTY_CELLS 0x02 158 #define XLSXIOREAD_SKIP_ALL_EMPTY (XLSXIOREAD_SKIP_EMPTY_ROWS | XLSXIOREAD_SKIP_EMPTY_CELLS) 160 #define XLSXIOREAD_SKIP_EXTRA_CELLS 0x04 DLL_EXPORT_XLSXIO xlsxioreader xlsxioread_open_filehandle(int filehandle)
open .xlsx file
struct xlsxio_read_struct * xlsxioreader
read handle for .xlsx object
Definition: xlsxio_read.h:95
DLL_EXPORT_XLSXIO size_t xlsxioread_sheet_last_column_index(xlsxioreadersheet sheethandle)
get index of last column read from current row in worksheet (returns 0 if no column was read yet)
DLL_EXPORT_XLSXIO void xlsxioread_list_sheets(xlsxioreader handle, xlsxioread_list_sheets_callback_fn callback, void *callbackdata)
list worksheets in .xlsx file
DLL_EXPORT_XLSXIO unsigned int xlsxioread_sheet_flags(xlsxioreadersheet sheethandle)
get flags used to open worksheet
int(* xlsxioread_list_sheets_callback_fn)(const XLSXIOCHAR *name, void *callbackdata)
type of pointer to callback function for listing worksheets
Definition: xlsxio_read.h:134
DLL_EXPORT_XLSXIO int xlsxioread_process(xlsxioreader handle, const XLSXIOCHAR *sheetname, unsigned int flags, xlsxioread_process_cell_callback_fn cell_callback, xlsxioread_process_row_callback_fn row_callback, void *callbackdata)
process all rows and columns of a worksheet in an .xlsx file
DLL_EXPORT_XLSXIO int xlsxioread_sheet_next_cell_int(xlsxioreadersheet sheethandle, int64_t *pvalue)
get next cell from worksheet as an integer
DLL_EXPORT_XLSXIO const XLSXIOCHAR * xlsxioread_get_version_string()
get xlsxio_write version string
int(* xlsxioread_process_row_callback_fn)(size_t row, size_t maxcol, void *callbackdata)
type of pointer to callback function for processing the end of a worksheet row
Definition: xlsxio_read.h:182
DLL_EXPORT_XLSXIO xlsxioreader xlsxioread_open_memory(void *data, uint64_t datalen, int freedata)
open .xlsx from memory buffer
DLL_EXPORT_XLSXIO XLSXIOCHAR * xlsxioread_sheet_next_cell(xlsxioreadersheet sheethandle)
get next cell from worksheet
DLL_EXPORT_XLSXIO xlsxioreader xlsxioread_open(const char *filename)
open .xlsx file
DLL_EXPORT_XLSXIO xlsxioreadersheetlist xlsxioread_sheetlist_open(xlsxioreader handle)
open list of worksheet names
DLL_EXPORT_XLSXIO void xlsxioread_close(xlsxioreader handle)
close .xlsx file
DLL_EXPORT_XLSXIO const XLSXIOCHAR * xlsxioread_sheetlist_next(xlsxioreadersheetlist sheetlisthandle)
get next worksheet name
struct xlsxio_read_sheetlist_struct * xlsxioreadersheetlist
read handle for list of worksheet names
Definition: xlsxio_read.h:200
DLL_EXPORT_XLSXIO size_t xlsxioread_sheet_last_row_index(xlsxioreadersheet sheethandle)
get index of last row read from worksheet (returns 0 if no row was read yet)
struct xlsxio_read_sheet_struct * xlsxioreadersheet
read handle for worksheet object
Definition: xlsxio_read.h:225
#define XLSXIOCHAR
character type used (usually char, but when XML_UNICODE is defined wchar_t)
Definition: xlsxio_read.h:53
DLL_EXPORT_XLSXIO void xlsxioread_get_version(int *pmajor, int *pminor, int *pmicro)
get xlsxio_write version
DLL_EXPORT_XLSXIO int xlsxioread_sheet_next_cell_float(xlsxioreadersheet sheethandle, double *pvalue)
get next cell from worksheet as a floating point value
DLL_EXPORT_XLSXIO void xlsxioread_sheetlist_close(xlsxioreadersheetlist sheetlisthandle)
close worksheet
int(* xlsxioread_process_cell_callback_fn)(size_t row, size_t col, const XLSXIOCHAR *value, void *callbackdata)
type of pointer to callback function for processing a worksheet cell value
Definition: xlsxio_read.h:172
DLL_EXPORT_XLSXIO void xlsxioread_sheet_close(xlsxioreadersheet sheethandle)
close worksheet
DLL_EXPORT_XLSXIO xlsxioreadersheet xlsxioread_sheet_open(xlsxioreader handle, const XLSXIOCHAR *sheetname, unsigned int flags)
open worksheet
DLL_EXPORT_XLSXIO int xlsxioread_sheet_next_row(xlsxioreadersheet sheethandle)
get next row from worksheet (to be called before each row)
DLL_EXPORT_XLSXIO int xlsxioread_sheet_next_cell_string(xlsxioreadersheet sheethandle, XLSXIOCHAR **pvalue)
get next cell from worksheet as a string
DLL_EXPORT_XLSXIO int xlsxioread_sheet_next_cell_datetime(xlsxioreadersheet sheethandle, time_t *pvalue)
get next cell from worksheet as date and time data