You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2021/08/09 23:37:13 UTC
svn commit: r1892146 -
/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java
Author: fanningpj
Date: Mon Aug 9 23:37:13 2021
New Revision: 1892146
URL: http://svn.apache.org/viewvc?rev=1892146&view=rev
Log:
[bug-65492] XSSFExportToXml does not handle formula type cells with boolean values
Modified:
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java?rev=1892146&r1=1892145&r2=1892146&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java Mon Aug 9 23:37:13 2021
@@ -277,7 +277,11 @@ public class XSSFExportToXml implements
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 {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org