From 676ecd90525e72b3865bf4f8f7f27bfb390cc37d Mon Sep 17 00:00:00 2001 From: 朱杰 <693337446@qq.com> Date: 星期四, 24 六月 2021 17:06:49 +0800 Subject: [PATCH] update 修改readme加入提问四部曲 --- ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) 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 073ece3..619ec80 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 @@ -513,7 +513,10 @@ } else if (ColumnType.NUMERIC == attr.cellType()) { - cell.setCellValue(StrUtil.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value)); + if (Validator.isNotNull(value)) + { + cell.setCellValue(StrUtil.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value)); + } } else if (ColumnType.IMAGE == attr.cellType()) { -- Gitblit v1.9.3