You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
486 B
22 lines
486 B
#include <QtCore>
|
|
#include "xlsxworkbook.h"
|
|
#include "xlsxworksheet.h"
|
|
|
|
#ifdef Q_OS_MAC
|
|
# define DATA_PATH "../../../"
|
|
#else
|
|
# define DATA_PATH "./"
|
|
#endif
|
|
|
|
int main()
|
|
{
|
|
QXlsx::Workbook workbook;
|
|
QXlsx::Worksheet *sheet = workbook.addWorksheet();
|
|
sheet->write("A1", "Hello Qt!");
|
|
sheet->write("B3", 12345);
|
|
sheet->write("C5", "=44+33");
|
|
sheet->write("D7", true);
|
|
workbook.save(DATA_PATH"Test.xlsx");
|
|
workbook.save(DATA_PATH"Test.zip");
|
|
return 0;
|
|
}
|
|
|