include/xlsxio_write.h File Reference
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
|
DLL_EXPORT_XLSXIO const char * | xlsxiowrite_get_version_string () |
| get xlsxio_write version string
|
DLL_EXPORT_XLSXIO xlsxiowriter | xlsxiowrite_open (const char *filename, const char *sheetname) |
| create and open .xlsx file
|
DLL_EXPORT_XLSXIO int | xlsxiowrite_close (xlsxiowriter handle) |
| close .xlsx file
|
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
|
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
|
DLL_EXPORT_XLSXIO void | xlsxiowrite_add_column (xlsxiowriter handle, const char *name, int width) |
| add a column cell
|
DLL_EXPORT_XLSXIO void | xlsxiowrite_add_cell_string (xlsxiowriter handle, const char *value) |
| add a cell with string data
|
DLL_EXPORT_XLSXIO void | xlsxiowrite_add_cell_int (xlsxiowriter handle, int64_t value) |
| add a cell with integer data
|
DLL_EXPORT_XLSXIO void | xlsxiowrite_add_cell_float (xlsxiowriter handle, double value) |
| add a cell with floating point data
|
DLL_EXPORT_XLSXIO void | xlsxiowrite_add_cell_datetime (xlsxiowriter handle, time_t value) |
| add a cell with date and time data
|
DLL_EXPORT_XLSXIO void | xlsxiowrite_next_row (xlsxiowriter handle) |
| mark the end of a row (next cell will start on a new row)
|
Detailed Description
XLSX I/O header file for writing .xlsx files.
- Author:
- Brecht Sanders
- Date:
- 2016 MIT
Include this header file to use XLSX I/O for writing .xlsx files and link with -lxlsxio_write.
Function Documentation
DLL_EXPORT_XLSXIO void xlsxiowrite_get_version |
( |
int * |
pmajor, |
|
|
int * |
pminor, |
|
|
int * |
pmicro | |
|
) |
| | |
get xlsxio_write version
- Parameters:
-
| 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 |
- See also:
- xlsxiowrite_get_version_string()
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
- Parameters:
-
| filename | path of .xlsx file to open |
| sheetname | name of worksheet |
- Returns:
- write handle for .xlsx object or NULL on error
- See also:
- xlsxiowrite_close()
DLL_EXPORT_XLSXIO int xlsxiowrite_close |
( |
xlsxiowriter |
handle |
) |
|
close .xlsx file
- Parameters:
-
| handle | write handle for .xlsx object |
- Returns:
- zero on success, non-zero on error
- See also:
- xlsxiowrite_open()
DLL_EXPORT_XLSXIO void xlsxiowrite_set_detection_rows |
( |
xlsxiowriter |
handle, |
|
|
size_t |
rows | |
|
) |
| | |
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
- Parameters:
-
| 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 |
- See also:
- xlsxiowrite_next_row()
DLL_EXPORT_XLSXIO void xlsxiowrite_add_column |
( |
xlsxiowriter |
handle, |
|
|
const char * |
name, |
|
|
int |
width | |
|
) |
| | |
DLL_EXPORT_XLSXIO void xlsxiowrite_add_cell_string |
( |
xlsxiowriter |
handle, |
|
|
const char * |
value | |
|
) |
| | |
add a cell with string data
- Parameters:
-
| handle | write handle for .xlsx object |
| value | string value |
- See also:
- xlsxiowrite_next_row()
DLL_EXPORT_XLSXIO void xlsxiowrite_add_cell_int |
( |
xlsxiowriter |
handle, |
|
|
int64_t |
value | |
|
) |
| | |
add a cell with integer data
- Parameters:
-
| handle | write handle for .xlsx object |
| value | integer value |
- See also:
- xlsxiowrite_next_row()
DLL_EXPORT_XLSXIO void xlsxiowrite_add_cell_float |
( |
xlsxiowriter |
handle, |
|
|
double |
value | |
|
) |
| | |
add a cell with floating point data
- Parameters:
-
| handle | write handle for .xlsx object |
| value | floating point value |
- See also:
- xlsxiowrite_next_row()
DLL_EXPORT_XLSXIO void xlsxiowrite_add_cell_datetime |
( |
xlsxiowriter |
handle, |
|
|
time_t |
value | |
|
) |
| | |
add a cell with date and time data
- Parameters:
-
| handle | write handle for .xlsx object |
| value | date and time value |
- See also:
- xlsxiowrite_next_row()
DLL_EXPORT_XLSXIO void xlsxiowrite_next_row |
( |
xlsxiowriter |
handle |
) |
|
mark the end of a row (next cell will start on a new row)
- Parameters:
-
| handle | write handle for .xlsx object |
- See also:
- xlsxiowrite_add_cell_string()