Commit 0d5ac47e628b688c61a10758ef39c7f69c33a5f8
1 parent
b63d2a01
Exists in
master
1.update excel
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
build.gradle
@@ -54,7 +54,7 @@ uploadArchives { | @@ -54,7 +54,7 @@ uploadArchives { | ||
54 | authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) | 54 | authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) |
55 | } | 55 | } |
56 | pom.project { | 56 | pom.project { |
57 | - version '1.1.17' | 57 | + version '1.1.18' |
58 | artifactId ARTIFACT_Id | 58 | artifactId ARTIFACT_Id |
59 | groupId GROUP_ID | 59 | groupId GROUP_ID |
60 | packaging TYPE | 60 | packaging TYPE |
src/main/java/com/taover/util/UtilExcel.java
@@ -42,13 +42,13 @@ public class UtilExcel { | @@ -42,13 +42,13 @@ public class UtilExcel { | ||
42 | } | 42 | } |
43 | } | 43 | } |
44 | String fileType = filePath.substring(filePath.lastIndexOf(".")); | 44 | String fileType = filePath.substring(filePath.lastIndexOf(".")); |
45 | - if(excel2003L.equals(fileType)){ | 45 | + if(excel2003L.equals(fileType.trim().toLowerCase())){ |
46 | if(isRead){ | 46 | if(isRead){ |
47 | wb = new HSSFWorkbook(new FileInputStream(filePath)); //2003- | 47 | wb = new HSSFWorkbook(new FileInputStream(filePath)); //2003- |
48 | }else{ | 48 | }else{ |
49 | wb = new HSSFWorkbook(); //2003- | 49 | wb = new HSSFWorkbook(); //2003- |
50 | } | 50 | } |
51 | - }else if(excel2007U.equals(fileType)){ | 51 | + }else if(excel2007U.equals(fileType.trim().toLowerCase())){ |
52 | if(isRead){ | 52 | if(isRead){ |
53 | wb = new XSSFWorkbook(new FileInputStream(filePath)); //2007+ | 53 | wb = new XSSFWorkbook(new FileInputStream(filePath)); //2007+ |
54 | }else{ | 54 | }else{ |