Container for a cell value.
More...
#include <freexl.h>
|
unsigned char | type |
| The type of data stored in this cell.
|
|
union { | |
|
int int_value | |
| if type is FREEXL_CELL_INT, then the corresponding value will be returned as int_value
|
|
double double_value | |
| if type is FREEXL_CELL_DOUBLE, then the corresponding value will be returned as double_value
|
|
const char * text_value | |
| if type is FREEXL_CELL_TEXT, FREEXL_CELL_SST_TEXT, FREEXL_CELL_DATE, FREEXL_CELL_DATETIME or FREEXL_CELL_TIME the corresponding value will be returned as text_value
|
|
} | value | |
| The value of the data stored in the cell.
|
|
Container for a cell value.
freexl_get_cell_value() takes a pointer to this structure, and fills in the appropriate values.
{
break;
break;
break;
break;
printf("NULL\n");
break;
default:
printf("Invalid data-type\n");
break;
}
#define FREEXL_CELL_INT
Cell contains an integer value.
Definition freexl.h:192
#define FREEXL_CELL_SST_TEXT
Cell contains a reference to a String.
Definition freexl.h:198
FREEXL_DECLARE int freexl_get_cell_value(const void *freexl_handle, unsigned int row, unsigned short column, FreeXL_CellValue *value)
Retrieve individual cell values from the currently active worksheet.
#define FREEXL_CELL_DOUBLE
Cell contains a floating point number.
Definition freexl.h:194
#define FREEXL_CELL_DATE
Cell contains a number intended to represent a date.
Definition freexl.h:200
#define FREEXL_CELL_TEXT
Cell contains a text value.
Definition freexl.h:196
#define FREEXL_CELL_TIME
Cell contains a number intended to represent a time.
Definition freexl.h:204
#define FREEXL_CELL_NULL
Cell has no value (empty cell)
Definition freexl.h:190
#define FREEXL_CELL_DATETIME
Cell contains a number intended to represent a date and time.
Definition freexl.h:202
Container for a cell value.
Definition freexl.h:354
const char * text_value
if type is FREEXL_CELL_TEXT, FREEXL_CELL_SST_TEXT, FREEXL_CELL_DATE, FREEXL_CELL_DATETIME or FREEXL_C...
Definition freexl.h:376
int int_value
if type is FREEXL_CELL_INT, then the corresponding value will be returned as int_value
Definition freexl.h:372
union FreeXL_CellValue_str::@0 value
The value of the data stored in the cell.
double double_value
if type is FREEXL_CELL_DOUBLE, then the corresponding value will be returned as double_value
Definition freexl.h:374
unsigned char type
The type of data stored in this cell.
Definition freexl.h:369
- Examples
- xl2sql.c.
◆ type
unsigned char FreeXL_CellValue_str::type |
The type of data stored in this cell.
Can be one of the following:
- FREEXL_CELL_NULL the cell contains a NULL value.
- FREEXL_CELL_INT the cell contains an INTEGER value.
- FREEXL_CELL_DOUBLE the cell contains a DOUBLE value.
- FREEXL_CELL_TEXT or FREEXL_CELL_SST_TEXT the cell contains a text string (always UTF-8 encoded)
- FREEXL_CELL_DATE the cell contains a date, encoded as a 'YYYY-MM-DD' string value
- FREEXL_CELL_DATETIME the cell contains a date and time, encoded as a 'YYYY-MM-DD HH:MM:SS' string value
- FREEXL_CELL_TIME the cell contains a time, encoded as a 'HH:MM:SS' string value
- Examples
- xl2sql.c.
◆ [union]
union { ... } FreeXL_CellValue_str::value |
The value of the data stored in the cell.
Which part of the union is valid is determined by the type value.
- Examples
- xl2sql.c.
The documentation for this struct was generated from the following file: