From 88ad5a2c19e5dfde778a63bc79306968bd847012 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 25 Dec 2024 16:24:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AF=BC=E5=85=A5=E5=B8=A6?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E6=96=87=E4=BB=B6=E5=85=B3=E9=97=AD=E6=B8=85?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/core/utils/poi/ExcelUtil.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java index d91fde03f..55316e047 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java @@ -283,11 +283,23 @@ public class ExcelUtil * @return 转换后集合 */ public List importExcel(InputStream is) + { + return importExcel(is, 0); + } + + /** + * 对excel表单默认第一个索引名转换成list + * + * @param is 输入流 + * @param titleNum 标题占用行数 + * @return 转换后集合 + */ + public List importExcel(InputStream is, int titleNum) { List list = null; try { - list = importExcel(is, 0); + list = importExcel(StringUtils.EMPTY, is, titleNum); } catch (Exception e) { @@ -301,18 +313,6 @@ public class ExcelUtil return list; } - /** - * 对excel表单默认第一个索引名转换成list - * - * @param is 输入流 - * @param titleNum 标题占用行数 - * @return 转换后集合 - */ - public List importExcel(InputStream is, int titleNum) throws Exception - { - return importExcel(StringUtils.EMPTY, is, titleNum); - } - /** * 对excel表单指定表格索引名转换成list *