From: PJ Fanning Date: Mon, 9 Aug 2021 23:37:13 +0000 (+0000) Subject: [bug-65492] XSSFExportToXml does not handle formula type cells with boolean values X-Git-Tag: REL_5_1_0~48 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b4e1eedcf8f781127d335b3af4ac375eb2712439;p=poi.git [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 --- 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 {