Document::read() works for shared formula now.

This commit is contained in:
Debao Zhang
2014-10-24 16:22:08 +08:00
parent 9cd65bc3f5
commit 41e3dc1bf7
6 changed files with 142 additions and 2 deletions
+7
View File
@@ -30,5 +30,12 @@ int main()
qDebug()<<xlsx.read("A7");
//![1]
//![2]
for (int row=1; row<10; ++row) {
if (QXlsx::Cell *cell=xlsx.cellAt(row, 1))
qDebug()<<cell->value();
}
//![2]
return 0;
}
+5
View File
@@ -81,6 +81,11 @@ int main()
//Make sure that read/write works well.
Document xlsx2("Book1.xlsx");
Worksheet *sharedFormulaSheet = dynamic_cast<Worksheet*>(xlsx2.sheet("SharedFormula"));
for (int row=2; row<20; ++row) {
qDebug()<<sharedFormulaSheet->read(row, 4);
}
xlsx2.saveAs("Book2.xlsx");
return 0;