Commit a71b649bf236ae93fe9da8265fbbcbbff6a2d288

Authored by 王彬
2 parents 5b6f45ea 959ee4c2
Exists in master

Merge branch 'master' of gitlab.taover.com:taov-erp/com-taover-util

Showing 1 changed file with 5 additions and 3 deletions   Show diff stats
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) {
... ...