From 959ee4c20428fa497bc5e503f365a790a95076c7 Mon Sep 17 00:00:00 2001 From: gaoming Date: Thu, 21 Nov 2019 20:32:50 +0800 Subject: [PATCH] . --- build.gradle | 2 +- src/main/java/com/taover/util/UtilExcel.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) 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