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
src/main/java/com/taover/util/UtilExcel.java
... | ... | @@ -42,13 +42,13 @@ public class UtilExcel { |
42 | 42 | } |
43 | 43 | } |
44 | 44 | String fileType = filePath.substring(filePath.lastIndexOf(".")); |
45 | - if(excel2003L.equals(fileType)){ | |
45 | + if(excel2003L.equals(fileType.trim().toLowerCase())){ | |
46 | 46 | if(isRead){ |
47 | 47 | wb = new HSSFWorkbook(new FileInputStream(filePath)); //2003- |
48 | 48 | }else{ |
49 | 49 | wb = new HSSFWorkbook(); //2003- |
50 | 50 | } |
51 | - }else if(excel2007U.equals(fileType)){ | |
51 | + }else if(excel2007U.equals(fileType.trim().toLowerCase())){ | |
52 | 52 | if(isRead){ |
53 | 53 | wb = new XSSFWorkbook(new FileInputStream(filePath)); //2007+ |
54 | 54 | }else{ | ... | ... |