登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
AI 队友
登录
注册
轻量养虾,开箱即用!低 Token + 稳定算力,Gitee & 模力方舟联合出品的 PocketClaw 正式开售!点击了解详情~
代码拉取完成,页面将自动刷新
开源项目
>
WEB应用开发
>
后台管理框架
&&
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
2.4K
Star
18.2K
Fork
11.4K
JEECG
/
JeecgBoot
代码
Issues
1
Pull Requests
0
Wiki
统计
流水线
服务
JavaDoc
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
开发画像分析
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
AutoPoi excel导入 ImportParams 中没有startSheetIndex参数
已完成
#I57UPC
fun
创建于
2022-05-17 15:18
##### 版本号: 2.4.6 ##### 问题描述: 我想读取指定的sheet,要读取上传得第二个sheet; AutoPoi excel导入 ImportParams 中没有startSheetIndex参数 ##### 截图&代码:  /** * Copyright 2013-2015 JEECG (jeecgos@163.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jeecgframework.poi.excel.entity; import org.jeecgframework.poi.handler.inter.IExcelVerifyHandler; import java.util.List; /** * 导入参数设置 * * @author JEECG * @date 2013-9-24 * @version 1.0 */ public class ImportParams extends ExcelBaseParams { /** * 表格标题行数,默认0 */ private int titleRows = 0; /** * 表头行数,默认1 */ private int headRows = 1; /** * 字段真正值和列标题之间的距离 默认0 */ private int startRows = 0; /** * 主键设置,如何这个cell没有值,就跳过 或者认为这个是list的下面的值 */ private int keyIndex = 0; /** * 上传表格需要读取的sheet 数量,默认为1 */ private int sheetNum = 1; /** * 是否需要保存上传的Excel,默认为false */ private boolean needSave = false; /** * 保存上传的Excel目录,默认是 如 TestEntity这个类保存路径就是 * upload/excelUpload/Test/yyyyMMddHHmss_***** 保存名称上传时间_五位随机数 */ private String saveUrl = "upload/excelUpload"; /** * 校验处理接口 */ private IExcelVerifyHandler verifyHanlder; /** * 最后的无效行数 */ private int lastOfInvalidRow = 0; /** * 不需要解析的表头 只作为多表头展示,无字段与其绑定 */ private List<String> ignoreHeaderList; /** * 图片列 集合 */ private List<String> imageList; public int getHeadRows() { return headRows; } public int getKeyIndex() { return keyIndex; } public String getSaveUrl() { return saveUrl; } public int getSheetNum() { return sheetNum; } public int getStartRows() { return startRows; } public int getTitleRows() { return titleRows; } public IExcelVerifyHandler getVerifyHanlder() { return verifyHanlder; } public boolean isNeedSave() { return needSave; } public void setHeadRows(int headRows) { this.headRows = headRows; } public void setKeyIndex(int keyIndex) { this.keyIndex = keyIndex; } public void setNeedSave(boolean needSave) { this.needSave = needSave; } public void setSaveUrl(String saveUrl) { this.saveUrl = saveUrl; } public void setSheetNum(int sheetNum) { this.sheetNum = sheetNum; } public void setStartRows(int startRows) { this.startRows = startRows; } public void setTitleRows(int titleRows) { this.titleRows = titleRows; } public void setVerifyHanlder(IExcelVerifyHandler verifyHanlder) { this.verifyHanlder = verifyHanlder; } public int getLastOfInvalidRow() { return lastOfInvalidRow; } public void setLastOfInvalidRow(int lastOfInvalidRow) { this.lastOfInvalidRow = lastOfInvalidRow; } public List<String> getImageList() { return imageList; } public void setImageList(List<String> imageList) { this.imageList = imageList; } public List<String> getIgnoreHeaderList() { return ignoreHeaderList; } public void setIgnoreHeaderList(List<String> ignoreHeaderList) { this.ignoreHeaderList = ignoreHeaderList; } /** * 根据表头显示的文字 判断是否忽略该表头 * @param text * @return */ public boolean isIgnoreHeader(String text){ if(ignoreHeaderList!=null && ignoreHeaderList.indexOf(text)>=0){ return true; } return false; } } #### 友情提示(为了提高issue处理效率): - 未按格式要求发帖,会被直接删掉; - 请自己初判问题描述是否清楚,是否方便我们调查处理; - 针对问题请说明是Online在线功能(需说明用的主题模板),还是生成的代码功能; - 描述过于简单或模糊,导致无法处理的,会被直接删掉;
##### 版本号: 2.4.6 ##### 问题描述: 我想读取指定的sheet,要读取上传得第二个sheet; AutoPoi excel导入 ImportParams 中没有startSheetIndex参数 ##### 截图&代码:  /** * Copyright 2013-2015 JEECG (jeecgos@163.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jeecgframework.poi.excel.entity; import org.jeecgframework.poi.handler.inter.IExcelVerifyHandler; import java.util.List; /** * 导入参数设置 * * @author JEECG * @date 2013-9-24 * @version 1.0 */ public class ImportParams extends ExcelBaseParams { /** * 表格标题行数,默认0 */ private int titleRows = 0; /** * 表头行数,默认1 */ private int headRows = 1; /** * 字段真正值和列标题之间的距离 默认0 */ private int startRows = 0; /** * 主键设置,如何这个cell没有值,就跳过 或者认为这个是list的下面的值 */ private int keyIndex = 0; /** * 上传表格需要读取的sheet 数量,默认为1 */ private int sheetNum = 1; /** * 是否需要保存上传的Excel,默认为false */ private boolean needSave = false; /** * 保存上传的Excel目录,默认是 如 TestEntity这个类保存路径就是 * upload/excelUpload/Test/yyyyMMddHHmss_***** 保存名称上传时间_五位随机数 */ private String saveUrl = "upload/excelUpload"; /** * 校验处理接口 */ private IExcelVerifyHandler verifyHanlder; /** * 最后的无效行数 */ private int lastOfInvalidRow = 0; /** * 不需要解析的表头 只作为多表头展示,无字段与其绑定 */ private List<String> ignoreHeaderList; /** * 图片列 集合 */ private List<String> imageList; public int getHeadRows() { return headRows; } public int getKeyIndex() { return keyIndex; } public String getSaveUrl() { return saveUrl; } public int getSheetNum() { return sheetNum; } public int getStartRows() { return startRows; } public int getTitleRows() { return titleRows; } public IExcelVerifyHandler getVerifyHanlder() { return verifyHanlder; } public boolean isNeedSave() { return needSave; } public void setHeadRows(int headRows) { this.headRows = headRows; } public void setKeyIndex(int keyIndex) { this.keyIndex = keyIndex; } public void setNeedSave(boolean needSave) { this.needSave = needSave; } public void setSaveUrl(String saveUrl) { this.saveUrl = saveUrl; } public void setSheetNum(int sheetNum) { this.sheetNum = sheetNum; } public void setStartRows(int startRows) { this.startRows = startRows; } public void setTitleRows(int titleRows) { this.titleRows = titleRows; } public void setVerifyHanlder(IExcelVerifyHandler verifyHanlder) { this.verifyHanlder = verifyHanlder; } public int getLastOfInvalidRow() { return lastOfInvalidRow; } public void setLastOfInvalidRow(int lastOfInvalidRow) { this.lastOfInvalidRow = lastOfInvalidRow; } public List<String> getImageList() { return imageList; } public void setImageList(List<String> imageList) { this.imageList = imageList; } public List<String> getIgnoreHeaderList() { return ignoreHeaderList; } public void setIgnoreHeaderList(List<String> ignoreHeaderList) { this.ignoreHeaderList = ignoreHeaderList; } /** * 根据表头显示的文字 判断是否忽略该表头 * @param text * @return */ public boolean isIgnoreHeader(String text){ if(ignoreHeaderList!=null && ignoreHeaderList.indexOf(text)>=0){ return true; } return false; } } #### 友情提示(为了提高issue处理效率): - 未按格式要求发帖,会被直接删掉; - 请自己初判问题描述是否清楚,是否方便我们调查处理; - 针对问题请说明是Online在线功能(需说明用的主题模板),还是生成的代码功能; - 描述过于简单或模糊,导致无法处理的,会被直接删掉;
评论 (
2
)
登录
后才可以发表评论
状态
已完成
待办的
进行中
已完成
已关闭
负责人
未设置
标签
未设置
标签管理
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (
-
)
标签 (
-
)
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
参与者(3)
Java
1
https://gitee.com/jeecg/JeecgBoot.git
git@gitee.com:jeecg/JeecgBoot.git
jeecg
JeecgBoot
JeecgBoot
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册