aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2021-08-09 23:37:13 +0000
committerPJ Fanning <fanningpj@apache.org>2021-08-09 23:37:13 +0000
commitb4e1eedcf8f781127d335b3af4ac375eb2712439 (patch)
treef7228510c8484b5fe198e07d67b2fbd35b03c469
parent1de0a5632152f6f54d42fc41674479ba54b0a334 (diff)
downloadpoi-b4e1eedcf8f781127d335b3af4ac375eb2712439.tar.gz
poi-b4e1eedcf8f781127d335b3af4ac375eb2712439.zip
[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
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java6
1 files changed, 5 insertions, 1 deletions
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<String>{
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 {