mirror of https://gitee.com/y_project/RuoYi.git
优化ExcelUtil空值处理
parent
74f3520693
commit
322c48882e
|
@ -543,7 +543,10 @@ public class ExcelUtil<T>
|
||||||
}
|
}
|
||||||
else if (ColumnType.NUMERIC == attr.cellType())
|
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())
|
else if (ColumnType.IMAGE == attr.cellType())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue