Excel导出类型NUMERIC支持精度浮点类型

This commit is contained in:
RuoYi 2020-09-09 11:30:34 +08:00
parent 9652906954
commit 33793d8eff
1 changed files with 1 additions and 1 deletions

View File

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