Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

导入excel要读取的sheet数量错误 #55

Open
13080217 opened this issue Sep 2, 2021 · 1 comment
Open

导入excel要读取的sheet数量错误 #55

13080217 opened this issue Sep 2, 2021 · 1 comment

Comments

@13080217
Copy link

13080217 commented Sep 2, 2021

问题

导入excel要读取的sheet数量应该由ImportParams的sheetNum决定,而不应该直接读取excel文件sheet数量,导入的excel有多个sheet可能是附录之类的无需读取的文件,使用excel文件的sheet数量读取会导致读入大量空行,如果sheet中只有图片还会报不识别该文件。

依赖

org.jeecgframework autopoi-web 1.3.4

文件位置

org\jeecgframework\poi\excel\imports\ExcelImportServer.java:428

代码

//begin-------author:liusq------date:20210313-----for:-------多sheet导入改造点--------
//获取导入文本的sheet数
int sheetNum = book.getNumberOfSheets();
if(sheetNum>1){
params.setSheetNum(sheetNum);
}
//end-------author:liusq------date:20210313-----for:-------多sheet导入改造点--------

@zjunqi89
Copy link

zjunqi89 commented Sep 4, 2021

对的,我也是遇到这个错误,低版本没有

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants