diff --git a/examples/demo.c b/examples/demo.c index 986ec355..a26114ab 100644 --- a/examples/demo.c +++ b/examples/demo.c @@ -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);