From 9b6a7929c8c6a1e28467db40929913ae678b58d8 Mon Sep 17 00:00:00 2001 From: "jipengfei.jpf" Date: Mon, 5 Nov 2018 16:34:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=A4=E6=96=AD=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=B1=BB=E5=9E=8B=E6=97=B6=E5=80=99BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- src/main/java/com/alibaba/excel/ExcelReader.java | 1 - src/main/java/com/alibaba/excel/support/ExcelTypeEnum.java | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index ac18f11..26c45a5 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 a04a832..bba06b0 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 8ba87fe..e010210 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; }