]> source.dussan.org Git - poi.git/commitdiff
[bug-66365] update XSSFExcelExtractor to better handle formula cells with cached...
authorPJ Fanning <fanningpj@apache.org>
Mon, 28 Nov 2022 14:14:09 +0000 (14:14 +0000)
committerPJ Fanning <fanningpj@apache.org>
Mon, 28 Nov 2022 14:14:09 +0000 (14:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905572 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java

index a8bc2ca678aa6cad3c140ce14efdebd3c14fe685..5524ded59bd3e79e9ab2af4ae5a598237c7fd4fd 100644 (file)
@@ -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) {