From b4e1eedcf8f781127d335b3af4ac375eb2712439 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Mon, 9 Aug 2021 23:37:13 +0000 Subject: [PATCH] [bug-65492] XSSFExportToXml does not handle formula type cells with boolean values git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1892146 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/poi/xssf/extractor/XSSFExportToXml.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java index c6afb66558..f893c8b61a 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java @@ -277,7 +277,11 @@ public class XSSFExportToXml implements Comparator{ case FORMULA: if (cell.getCachedFormulaResultType() == CellType.STRING) { value = cell.getStringCellValue(); - } else { + } else if (cell.getCachedFormulaResultType() == CellType.BOOLEAN) { + value += cell.getBooleanCellValue(); + } else if (cell.getCachedFormulaResultType() == CellType.ERROR) { + value = cell.getErrorCellString(); + } else if (cell.getCachedFormulaResultType() == CellType.NUMERIC) { if (DateUtil.isCellDateFormatted(cell)) { value = getFormattedDate(cell); } else { -- 2.39.5