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 ...@@ -337,7 +337,6 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
} }
} }
Optional<PeriodCellTemplate> tempPeriodCellTemplate = periodCellTemplateList.stream() Optional<PeriodCellTemplate> tempPeriodCellTemplate = periodCellTemplateList.stream()
.filter(a -> a.getCellTemplateId().equals(periodCellTemplateConfig.getCellTemplateId())) .filter(a -> a.getCellTemplateId().equals(periodCellTemplateConfig.getCellTemplateId()))
.findFirst(); .findFirst();
...@@ -354,6 +353,10 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen ...@@ -354,6 +353,10 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
Cell cell = sheet.getRow(tempPeriodCellTemplate.get().getRowIndex()) Cell cell = sheet.getRow(tempPeriodCellTemplate.get().getRowIndex())
.getCell(tempPeriodCellTemplate.get().getColumnIndex()); .getCell(tempPeriodCellTemplate.get().getColumnIndex());
data = ((XSSFCell) cell).getRawValue(); 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)) { // if (cell.getCellTypeEnum().equals(CellType.NUMERIC)||cell.getCellTypeEnum().equals(CellType.FORMULA)) {
// data = Double.toString(cell.getNumericCellValue()); // data = Double.toString(cell.getNumericCellValue());
// } else { // } 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