From 0d5ac47e628b688c61a10758ef39c7f69c33a5f8 Mon Sep 17 00:00:00 2001 From: 王彬 Date: Wed, 16 Oct 2019 13:49:16 +0800 Subject: [PATCH] 1.update excel --- build.gradle | 2 +- src/main/java/com/taover/util/UtilExcel.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 75124ca..54ae377 100644 --- a/build.gradle +++ b/build.gradle @@ -54,7 +54,7 @@ uploadArchives { authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) } pom.project { - version '1.1.17' + version '1.1.18' artifactId ARTIFACT_Id groupId GROUP_ID packaging TYPE diff --git a/src/main/java/com/taover/util/UtilExcel.java b/src/main/java/com/taover/util/UtilExcel.java index 8ecf2a2..f02b640 100644 --- a/src/main/java/com/taover/util/UtilExcel.java +++ b/src/main/java/com/taover/util/UtilExcel.java @@ -42,13 +42,13 @@ public class UtilExcel { } } String fileType = filePath.substring(filePath.lastIndexOf(".")); - if(excel2003L.equals(fileType)){ + if(excel2003L.equals(fileType.trim().toLowerCase())){ if(isRead){ wb = new HSSFWorkbook(new FileInputStream(filePath)); //2003- }else{ wb = new HSSFWorkbook(); //2003- } - }else if(excel2007U.equals(fileType)){ + }else if(excel2007U.equals(fileType.trim().toLowerCase())){ if(isRead){ wb = new XSSFWorkbook(new FileInputStream(filePath)); //2007+ }else{ -- libgit2 0.21.2