Commit 959ee4c20428fa497bc5e503f365a790a95076c7

Authored by gaoming
1 parent 3e214bbc
Exists in master

.

build.gradle
... ... @@ -59,7 +59,7 @@ uploadArchives {
59 59 authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
60 60 }
61 61 pom.project {
62   - version '1.1.24'
  62 + version '1.1.25'
63 63 artifactId ARTIFACT_Id
64 64 groupId GROUP_ID
65 65 packaging TYPE
... ...
src/main/java/com/taover/util/UtilExcel.java
... ... @@ -321,8 +321,9 @@ public class UtilExcel {
321 321  
322 322 }else if(currCellType.compareTo(CellType.BOOLEAN) == 0){
323 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 327 || currCellType.compareTo(CellType.ERROR) == 0){
327 328 dataRow.add("");
328 329 }
... ... @@ -394,10 +395,11 @@ public class UtilExcel {
394 395  
395 396 public static void main(String args[]){
396 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 399 List<List<Object>> data = null;
399 400 try {
400 401 data = UtilExcel.readExcel(filepath);
  402 + System.out.println(data);
401 403 System.out.println(data.size());
402 404 System.out.println(UtilExcel.readExcelExcludeHideLine(filepath).size());
403 405 } catch (Exception e) {
... ...