Commit 959ee4c20428fa497bc5e503f365a790a95076c7
1 parent
3e214bbc
Exists in
master
.
Showing
2 changed files
with
6 additions
and
4 deletions
Show diff stats
build.gradle
@@ -59,7 +59,7 @@ uploadArchives { | @@ -59,7 +59,7 @@ uploadArchives { | ||
59 | authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) | 59 | authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) |
60 | } | 60 | } |
61 | pom.project { | 61 | pom.project { |
62 | - version '1.1.24' | 62 | + version '1.1.25' |
63 | artifactId ARTIFACT_Id | 63 | artifactId ARTIFACT_Id |
64 | groupId GROUP_ID | 64 | groupId GROUP_ID |
65 | packaging TYPE | 65 | packaging TYPE |
src/main/java/com/taover/util/UtilExcel.java
@@ -321,8 +321,9 @@ public class UtilExcel { | @@ -321,8 +321,9 @@ public class UtilExcel { | ||
321 | 321 | ||
322 | }else if(currCellType.compareTo(CellType.BOOLEAN) == 0){ | 322 | }else if(currCellType.compareTo(CellType.BOOLEAN) == 0){ |
323 | dataRow.add(cell.getBooleanCellValue()); | 323 | dataRow.add(cell.getBooleanCellValue()); |
324 | - }else if(currCellType.compareTo(CellType.FORMULA) == 0 | ||
325 | - || currCellType.compareTo(CellType.BLANK) == 0 | 324 | + }else if(currCellType.compareTo(CellType.FORMULA) == 0){ |
325 | + dataRow.add(cell.getStringCellValue()); | ||
326 | + }else if(currCellType.compareTo(CellType.BLANK) == 0 | ||
326 | || currCellType.compareTo(CellType.ERROR) == 0){ | 327 | || currCellType.compareTo(CellType.ERROR) == 0){ |
327 | dataRow.add(""); | 328 | dataRow.add(""); |
328 | } | 329 | } |
@@ -394,10 +395,11 @@ public class UtilExcel { | @@ -394,10 +395,11 @@ public class UtilExcel { | ||
394 | 395 | ||
395 | public static void main(String args[]){ | 396 | public static void main(String args[]){ |
396 | //String filepath = "C:\\Users\\root\\Desktop\\千丁-6.27.xlsx"; | 397 | //String filepath = "C:\\Users\\root\\Desktop\\千丁-6.27.xlsx"; |
397 | - String filepath = "C:\\Users\\EDZ\\Desktop\\gaoming测试甩单.csv"; | 398 | + String filepath = "C:\\Users\\EDZ\\Desktop\\榴莲1 (5).xlsx"; |
398 | List<List<Object>> data = null; | 399 | List<List<Object>> data = null; |
399 | try { | 400 | try { |
400 | data = UtilExcel.readExcel(filepath); | 401 | data = UtilExcel.readExcel(filepath); |
402 | + System.out.println(data); | ||
401 | System.out.println(data.size()); | 403 | System.out.println(data.size()); |
402 | System.out.println(UtilExcel.readExcelExcludeHideLine(filepath).size()); | 404 | System.out.println(UtilExcel.readExcelExcludeHideLine(filepath).size()); |
403 | } catch (Exception e) { | 405 | } catch (Exception e) { |