[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
This commit is contained in:
PJ Fanning 2021-08-09 23:37:13 +00:00
parent 1de0a56321
commit b4e1eedcf8

View File

@ -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 {