Commit d029ffde7ba499d2c5bdb4ca6f73aaaf4d9713f3

Authored by gaoming
1 parent e5b28cab
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.101'
  62 + version '1.1.102'
63 63 artifactId ARTIFACT_Id
64 64 groupId GROUP_ID
65 65 packaging TYPE
... ...
src/main/java/com/taover/util/UtilExcel.java
... ... @@ -451,7 +451,7 @@ public class UtilExcel {
451 451 short format = cell.getCellStyle().getDataFormat();
452 452 if (cell.getCellStyle().getDataFormat()==28 || cell.getCellStyle().getDataFormat()==22||cell.getCellStyle().getDataFormat()==31
453 453 || cell.getCellStyle().getDataFormat() == 58 || cell.getCellStyle().getDataFormat()==14
454   - || cell.getCellStyle().getDataFormat()==57 || cell.getCellStyle().getDataFormat()==32 || cell.getCellStyle().getDataFormat()==20) {
  454 + || cell.getCellStyle().getDataFormat()==57 || cell.getCellStyle().getDataFormat()==32 || cell.getCellStyle().getDataFormat()==20 || cell.getCellStyle().getDataFormat()==176) {
455 455  
456 456 // 如果是date类型则 ,获取该cell的date值
457 457 //return new SimpleDateFormat("yyyy-MM-dd").format(DateUtil.getJavaDate(cell.getNumericCellValue()));
... ... @@ -515,7 +515,7 @@ public class UtilExcel {
515 515 System.out.println(df.format(3.3300));
516 516  
517 517  
518   - String filepath = "C:\\Users\\EDZ\\Desktop\\testjson1.xlsx";
  518 + String filepath = "C:\\Users\\EDZ\\Desktop\\ttt.xlsx";
519 519 List<List<Object>> data = null;
520 520  
521 521 try {
... ...