Fix Issue #40 example worksheetoperations crash.

The error is caused by SHA: a1e53218bb

The "Sheet1" will not be cteated Unless the user want to access it,
or the user want to save an empty workbook.
This commit is contained in:
Debao Zhang
2014-10-20 14:43:37 +08:00
parent ce05cf8528
commit fc32234da8
+1 -2
View File
@@ -5,12 +5,11 @@ int main()
{
QXlsx::Document xlsx;
xlsx.renameSheet("Sheet1", "TheFirstSheet");
for (int i=1; i<20; ++i) {
for (int j=1; j<15; ++j)
xlsx.write(i, j, QString("R %1 C %2").arg(i).arg(j));
}
xlsx.renameSheet("Sheet1", "TheFirstSheet");
xlsx.addSheet("TheSecondSheet");
xlsx.write(2, 2, "Hello Qt Xlsx");