|
XLSX I/O
|
XLSX I/O header file for writing .xlsx files. More...
#include <stdlib.h>#include <stdint.h>#include <time.h>Go to the source code of this file.
Typedefs | |
| typedef struct xlsxio_write_struct * | xlsxiowriter |
| write handle for .xlsx object | |
Functions | |
| DLL_EXPORT_XLSXIO void | xlsxiowrite_get_version (int *pmajor, int *pminor, int *pmicro) |
| get xlsxio_write version More... | |
| DLL_EXPORT_XLSXIO const char * | xlsxiowrite_get_version_string () |
| get xlsxio_write version string More... | |
| DLL_EXPORT_XLSXIO xlsxiowriter | xlsxiowrite_open (const char *filename, const char *sheetname) |
| create and open .xlsx file More... | |
| DLL_EXPORT_XLSXIO int | xlsxiowrite_close (xlsxiowriter handle) |
| close .xlsx file More... | |
| DLL_EXPORT_XLSXIO void | xlsxiowrite_set_detection_rows (xlsxiowriter handle, size_t rows) |
| specify how many initial rows will be buffered in memory to determine column widths More... | |
| DLL_EXPORT_XLSXIO void | xlsxiowrite_set_row_height (xlsxiowriter handle, size_t height) |
| specify the row height to use for the current and next rows More... | |
| DLL_EXPORT_XLSXIO void | xlsxiowrite_add_column (xlsxiowriter handle, const char *name, int width) |
| add a column cell More... | |
| DLL_EXPORT_XLSXIO void | xlsxiowrite_add_cell_string (xlsxiowriter handle, const char *value) |
| add a cell with string data More... | |
| DLL_EXPORT_XLSXIO void | xlsxiowrite_add_cell_int (xlsxiowriter handle, int64_t value) |
| add a cell with integer data More... | |
| DLL_EXPORT_XLSXIO void | xlsxiowrite_add_cell_float (xlsxiowriter handle, double value) |
| add a cell with floating point data More... | |
| DLL_EXPORT_XLSXIO void | xlsxiowrite_add_cell_datetime (xlsxiowriter handle, time_t value) |
| add a cell with date and time data More... | |
| DLL_EXPORT_XLSXIO void | xlsxiowrite_next_row (xlsxiowriter handle) |
| mark the end of a row (next cell will start on a new row) More... | |
XLSX I/O header file for writing .xlsx files.
Include this header file to use XLSX I/O for writing .xlsx files and link with -lxlsxio_write.
| DLL_EXPORT_XLSXIO void xlsxiowrite_get_version | ( | int * | pmajor, |
| int * | pminor, | ||
| int * | pmicro | ||
| ) |
get xlsxio_write version
| pmajor | pointer to integer that will receive major version number |
| pminor | pointer to integer that will receive minor version number |
| pmicro | pointer to integer that will receive micro version number |
| DLL_EXPORT_XLSXIO const char* xlsxiowrite_get_version_string | ( | ) |
| DLL_EXPORT_XLSXIO xlsxiowriter xlsxiowrite_open | ( | const char * | filename, |
| const char * | sheetname | ||
| ) |
create and open .xlsx file
| filename | path of .xlsx file to open |
| sheetname | name of worksheet |
| DLL_EXPORT_XLSXIO int xlsxiowrite_close | ( | xlsxiowriter | handle | ) |
close .xlsx file
| handle | write handle for .xlsx object |
| DLL_EXPORT_XLSXIO void xlsxiowrite_set_detection_rows | ( | xlsxiowriter | handle, |
| size_t | rows | ||
| ) |
specify how many initial rows will be buffered in memory to determine column widths
| handle | write handle for .xlsx object |
| rows | number of rows to buffer in memory, zero for none Must be called before the first call to xlsxiowrite_next_row() |
| DLL_EXPORT_XLSXIO void xlsxiowrite_set_row_height | ( | xlsxiowriter | handle, |
| size_t | height | ||
| ) |
specify the row height to use for the current and next rows
| handle | write handle for .xlsx object |
| height | row height (in text lines), zero for unspecified Must be called before the first call to any xlsxiowrite_add_ function of the current row |
| DLL_EXPORT_XLSXIO void xlsxiowrite_add_column | ( | xlsxiowriter | handle, |
| const char * | name, | ||
| int | width | ||
| ) |
add a column cell
| handle | write handle for .xlsx object |
| name | column name |
| width | column width (in characters) Only one row of column names is supported or none. Call for each column, and finish column row by calling xlsxiowrite_next_row(). Must be called before any xlsxiowrite_next_row() or the xlsxiowrite_add_cell_ functions. |
| DLL_EXPORT_XLSXIO void xlsxiowrite_add_cell_string | ( | xlsxiowriter | handle, |
| const char * | value | ||
| ) |
add a cell with string data
| handle | write handle for .xlsx object |
| value | string value |
| DLL_EXPORT_XLSXIO void xlsxiowrite_add_cell_int | ( | xlsxiowriter | handle, |
| int64_t | value | ||
| ) |
add a cell with integer data
| handle | write handle for .xlsx object |
| value | integer value |
| DLL_EXPORT_XLSXIO void xlsxiowrite_add_cell_float | ( | xlsxiowriter | handle, |
| double | value | ||
| ) |
add a cell with floating point data
| handle | write handle for .xlsx object |
| value | floating point value |
| DLL_EXPORT_XLSXIO void xlsxiowrite_add_cell_datetime | ( | xlsxiowriter | handle, |
| time_t | value | ||
| ) |
add a cell with date and time data
| handle | write handle for .xlsx object |
| value | date and time value |
| DLL_EXPORT_XLSXIO void xlsxiowrite_next_row | ( | xlsxiowriter | handle | ) |
mark the end of a row (next cell will start on a new row)
| handle | write handle for .xlsx object |
1.8.14