This commit is contained in:
lxyer 2018-08-26 22:04:29 +08:00
parent cdda62a17b
commit 9f92af761d

View File

@ -250,6 +250,7 @@ public class ExcelKit {
wk = new XSSFWorkbook(new FileInputStream(file));
}
Sheet sheet = sheetName == null ? wk.getSheetAt(0) : wk.getSheet(sheetName);
if (sheet == null) throw new OfficeXmlFileException("sheet["+sheetName+"] can't find");
return readExcel(sheet, fields, lastRowNum);
}