Browse Source

修复判断文件类型时候BUG

bugfix
jipengfei.jpf 6 years ago
parent
commit
9b6a7929c8
  1. 2
      pom.xml
  2. 1
      src/main/java/com/alibaba/excel/ExcelReader.java
  3. 3
      src/main/java/com/alibaba/excel/support/ExcelTypeEnum.java

2
pom.xml

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
<packaging>jar</packaging>
<name>easyexcel</name>

1
src/main/java/com/alibaba/excel/ExcelReader.java

@ -49,7 +49,6 @@ public class ExcelReader {
}
/**
* old 1.1.0
* @param param
* @param eventListener
*/

3
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;
}

Loading…
Cancel
Save