Commit dc6f7767 authored by frank.xa.zhang's avatar frank.xa.zhang

fixed #VALUE! error

parent b5fbbe27
......@@ -337,7 +337,6 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
}
}
Optional<PeriodCellTemplate> tempPeriodCellTemplate = periodCellTemplateList.stream()
.filter(a -> a.getCellTemplateId().equals(periodCellTemplateConfig.getCellTemplateId()))
.findFirst();
......@@ -354,6 +353,10 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
Cell cell = sheet.getRow(tempPeriodCellTemplate.get().getRowIndex())
.getCell(tempPeriodCellTemplate.get().getColumnIndex());
data = ((XSSFCell) cell).getRawValue();
if(data.equals("#VALUE!")){
data = "0.0";
}
//evaluator.evaluate(cell)
// if (cell.getCellTypeEnum().equals(CellType.NUMERIC)||cell.getCellTypeEnum().equals(CellType.FORMULA)) {
// data = Double.toString(cell.getNumericCellValue());
// } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment