优化ExcelUtil空值处理

master
Ricky 4 years ago
parent 2575c17f47
commit 2c94587263
  1. 5
      ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java

@ -541,7 +541,10 @@ public class ExcelUtil<T>
}
else if (ColumnType.NUMERIC == attr.cellType())
{
cell.setCellValue(StringUtils.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value));
if (StringUtils.isNotNull(value))
{
cell.setCellValue(StringUtils.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value));
}
}
else if (ColumnType.IMAGE == attr.cellType())
{

Loading…
Cancel
Save