From: PJ Fanning Date: Mon, 28 Nov 2022 14:14:09 +0000 (+0000) Subject: [bug-66365] update XSSFExcelExtractor to better handle formula cells with cached... X-Git-Tag: REL_5_2_4~359 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c8f4cbd20b3d2670274a4d035a729c7fadf75837;p=poi.git [bug-66365] update XSSFExcelExtractor to better handle formula cells with cached results of string type git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905572 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java index a8bc2ca678..5524ded59b 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java @@ -224,6 +224,10 @@ public class XSSFExcelExtractor CellType type = cell.getCellType(); if (type == CellType.FORMULA) { type = cell.getCachedFormulaResultType(); + if (type == CellType.STRING) { + handleStringCell(text, cell); + return; + } } if (type == CellType.NUMERIC) {