Minor fix to example.

This commit is contained in:
John McNamara 2014-06-09 23:54:03 +01:00
parent 0509cce18f
commit 6f77aa6022

View File

@ -9,10 +9,8 @@
int main() {
/* Create a new workbook. */
lxw_workbook *workbook = new_workbook("hello_world.xlsx");
/* Add a worksheet. */
/* Create a new workbook and add a worksheet. */
lxw_workbook *workbook = new_workbook("demo.xlsx");
lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL);
/* Add a format. */
@ -28,8 +26,8 @@ int main() {
worksheet_write_string(worksheet, 1, 0, "World", format);
/* Writer some numbers. */
worksheet_write_number(worksheet, 1, 0, 123, NULL);
worksheet_write_number(worksheet, 1, 0, 123.456, NULL);
worksheet_write_number(worksheet, 2, 0, 123, NULL);
worksheet_write_number(worksheet, 3, 0, 123.456, NULL);
workbook_close(workbook);