2014-06-08 17:40:59 +01:00
|
|
|
/*
|
|
|
|
* Example of writing some data to a simple Excel file using libxlsxwriter.
|
|
|
|
*
|
2025-02-11 00:03:36 +00:00
|
|
|
* Copyright 2014-2025, John McNamara, jmcnamara@cpan.org
|
2014-06-08 17:40:59 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "xlsxwriter.h"
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
2016-01-04 19:48:16 +00:00
|
|
|
lxw_workbook *workbook = workbook_new("hello_world.xlsx");
|
2014-06-08 17:40:59 +01:00
|
|
|
lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL);
|
|
|
|
|
|
|
|
worksheet_write_string(worksheet, 0, 0, "Hello", NULL);
|
|
|
|
worksheet_write_number(worksheet, 1, 0, 123, NULL);
|
|
|
|
|
|
|
|
workbook_close(workbook);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|