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

pull/22/head
RuoYi 4 years ago
parent 0ffefeb420
commit 155b585ae5

@ -494,7 +494,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));
} }
} }

Loading…
Cancel
Save