Sfoglia il codice sorgente

[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
tags/REL_5_1_0
PJ Fanning 2 anni fa
parent
commit
b4e1eedcf8

+ 5
- 1
poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java Vedi 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 {

Loading…
Annulla
Salva