diff --git a/pom.xml b/pom.xml index ac18f11e..26c45a59 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.alibaba easyexcel - 1.1.0 + 1.1.1 jar easyexcel diff --git a/src/main/java/com/alibaba/excel/ExcelReader.java b/src/main/java/com/alibaba/excel/ExcelReader.java index a04a832a..bba06b0b 100644 --- a/src/main/java/com/alibaba/excel/ExcelReader.java +++ b/src/main/java/com/alibaba/excel/ExcelReader.java @@ -49,7 +49,6 @@ public class ExcelReader { } /** - * old 1.1.0 * @param param * @param eventListener */ diff --git a/src/main/java/com/alibaba/excel/support/ExcelTypeEnum.java b/src/main/java/com/alibaba/excel/support/ExcelTypeEnum.java index 8ba87fe7..e0102100 100644 --- a/src/main/java/com/alibaba/excel/support/ExcelTypeEnum.java +++ b/src/main/java/com/alibaba/excel/support/ExcelTypeEnum.java @@ -28,7 +28,8 @@ public enum ExcelTypeEnum { } public static ExcelTypeEnum valueOf(InputStream inputStream){ try { - FileMagic fileMagic = FileMagic.valueOf(inputStream); + InputStream in = FileMagic.prepareToCheckMagic(inputStream); + FileMagic fileMagic = FileMagic.valueOf(in); if(FileMagic.OLE2.equals(fileMagic)){ return XLS; }