diff --git a/build.gradle b/build.gradle index bc3ebaa..10711f4 100644 --- a/build.gradle +++ b/build.gradle @@ -59,7 +59,7 @@ uploadArchives { authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) } pom.project { - version '1.1.24' + version '1.1.25' 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 04502d1..7c470a2 100644 --- a/src/main/java/com/taover/util/UtilExcel.java +++ b/src/main/java/com/taover/util/UtilExcel.java @@ -321,8 +321,9 @@ public class UtilExcel { }else if(currCellType.compareTo(CellType.BOOLEAN) == 0){ dataRow.add(cell.getBooleanCellValue()); - }else if(currCellType.compareTo(CellType.FORMULA) == 0 - || currCellType.compareTo(CellType.BLANK) == 0 + }else if(currCellType.compareTo(CellType.FORMULA) == 0){ + dataRow.add(cell.getStringCellValue()); + }else if(currCellType.compareTo(CellType.BLANK) == 0 || currCellType.compareTo(CellType.ERROR) == 0){ dataRow.add(""); } @@ -394,10 +395,11 @@ public class UtilExcel { public static void main(String args[]){ //String filepath = "C:\\Users\\root\\Desktop\\千丁-6.27.xlsx"; - String filepath = "C:\\Users\\EDZ\\Desktop\\gaoming测试甩单.csv"; + String filepath = "C:\\Users\\EDZ\\Desktop\\榴莲1 (5).xlsx"; List> data = null; try { data = UtilExcel.readExcel(filepath); + System.out.println(data); System.out.println(data.size()); System.out.println(UtilExcel.readExcelExcludeHideLine(filepath).size()); } catch (Exception e) { -- libgit2 0.21.2