文档拆分-bug59041,58779

This commit is contained in:
liyawei
2022-09-01 16:38:00 +08:00
parent 3e75d0a093
commit fa148cb12e
@@ -1702,8 +1702,14 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
InputStream is = new FileInputStream(file);
String name = file.getName().toLowerCase();
// 创建excel操作对象
if (name.contains(".xlsx") || name.contains(".xls")) {
if (name.contains(".xlsx")) {
workbook = WorkbookFactory.create(is);
} else {
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("请导入正确模板!");
} else {
throw new JeroBootException("Please import the correct template");
}
}
//得到一个工作表
Sheet sheet = workbook.getSheetAt(0);