From 995b227a48dea5bcafea260acbd9901f902d4659 Mon Sep 17 00:00:00 2001 From: Debao Zhang Date: Mon, 26 Aug 2013 13:54:50 +0800 Subject: [PATCH] Improve the example --- examples/hello/main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/examples/hello/main.cpp b/examples/hello/main.cpp index 955db4b..b4b1c62 100755 --- a/examples/hello/main.cpp +++ b/examples/hello/main.cpp @@ -16,6 +16,19 @@ int main() sheet->write("B3", 12345); sheet->write("C5", "=44+33"); sheet->write("D7", true); + + QXlsx::Worksheet *sheet2 = workbook.addWorksheet(); + sheet2->write(0, 0, "First"); + sheet2->write(1, 0, "Second"); + sheet2->write(2, 0, "Third"); + sheet2->write(3, 0, "Fourth"); + sheet2->write(4, 0, "Total"); + sheet2->write(0, 1, 100); + sheet2->write(1, 1, 200); + sheet2->write(2, 1, 300); + sheet2->write(3, 1, 400); + sheet2->write(4, 1, "=SUM(B1:B4)"); + workbook.save(DATA_PATH"Test.xlsx"); workbook.save(DATA_PATH"Test.zip"); return 0;