文档拆分-bug59041,58779
This commit is contained in:
+7
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user