From fa4082f945981da2fa7cd5e3aa0a71fdfee2dfe2 Mon Sep 17 00:00:00 2001 From: Israel Galadima Date: Wed, 8 Jan 2025 07:41:34 +0100 Subject: [PATCH] check showFormulas property in read function to decide whether to return cell value or formula text --- QXlsx/source/xlsxworksheet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QXlsx/source/xlsxworksheet.cpp b/QXlsx/source/xlsxworksheet.cpp index 9f692f94..056b0210 100644 --- a/QXlsx/source/xlsxworksheet.cpp +++ b/QXlsx/source/xlsxworksheet.cpp @@ -520,7 +520,7 @@ QVariant Worksheet::read(int row, int column) const if (!cell) return QVariant(); - if (cell->hasFormula()) { + if (cell->hasFormula() && d->showFormulas) { if (cell->formula().formulaType() == CellFormula::NormalType) { return QVariant(QLatin1String("=") + cell->formula().formulaText()); } else if (cell->formula().formulaType() == CellFormula::SharedType) {