Commit 0d53168f98acec754ed701b7fd233afcbf051a93
1 parent
7c0a00a5
Exists in
master
.
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
build.gradle
src/main/java/com/taover/util/UtilExcel.java
... | ... | @@ -449,12 +449,12 @@ public class UtilExcel { |
449 | 449 | */ |
450 | 450 | System.out.println(cell.getCellStyle().getDataFormat()); |
451 | 451 | short format = cell.getCellStyle().getDataFormat(); |
452 | - if (format==28 || format==22||format==31 || format == 58 || format==14 || format==57 || format==32 || format==20 || format==176 || format==177 ) { | |
452 | + if (format==28 || format==22||format==31 || format == 58 || format==14 || format==57 || format==32 || format==20 || format==176 ) { | |
453 | 453 | |
454 | 454 | // 如果是date类型则 ,获取该cell的date值 |
455 | 455 | //return new SimpleDateFormat("yyyy-MM-dd").format(DateUtil.getJavaDate(cell.getNumericCellValue())); |
456 | 456 | SimpleDateFormat sdf = null; |
457 | - if(format == 14 || format == 31 || format == 57 || format == 58 || format == 177){ | |
457 | + if(format == 14 || format == 31 || format == 57 || format == 58 ){ | |
458 | 458 | //日期 |
459 | 459 | sdf = new SimpleDateFormat("yyyy-MM-dd"); |
460 | 460 | }else if (format == 20 || format == 32) { |
... | ... | @@ -513,7 +513,7 @@ public class UtilExcel { |
513 | 513 | System.out.println(df.format(3.3300)); |
514 | 514 | |
515 | 515 | |
516 | - String filepath = "C:\\Users\\EDZ\\Desktop\\date.xlsx"; | |
516 | + String filepath = "C:\\Users\\EDZ\\Desktop\\ttt.xls"; | |
517 | 517 | List<List<Object>> data = null; |
518 | 518 | |
519 | 519 | try { | ... | ... |