diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index 4e93c6cfe..43e52daf5 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -503,7 +503,7 @@ public class ExcelUtil else if (ColumnType.NUMERIC == attr.cellType()) { cell.setCellType(CellType.NUMERIC); - cell.setCellValue(Integer.parseInt(value + "")); + cell.setCellValue(StringUtils.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value)); } }