This commit is contained in:
Looly
2020-10-27 18:14:18 +08:00
parent b3d2f7a94f
commit e7613143d8
5 changed files with 39 additions and 12 deletions

View File

@@ -66,7 +66,7 @@ public class WorkbookUtil {
}
if (excelFile.exists()) {
return createBook(FileUtil.getInputStream(excelFile), true);
return createBook(FileUtil.getInputStream(excelFile));
}
return createBook(StrUtil.endWithIgnoreCase(excelFile.getName(), ".xlsx"));
@@ -95,6 +95,7 @@ public class WorkbookUtil {
* @return {@link Workbook}
* @deprecated 使用完毕无论是否closeAfterReadpoi会关闭流此参数无意义请使用{@link #createBook(InputStream)}
*/
@Deprecated
public static Workbook createBook(InputStream in, boolean closeAfterRead) {
return createBook(in, null);
}