Commit d029ffde7ba499d2c5bdb4ca6f73aaaf4d9713f3
1 parent
e5b28cab
Exists in
master
优化读取日期
Showing
2 changed files
with
3 additions
and
3 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.101' | 62 | + version '1.1.102' | 
| 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
| @@ -451,7 +451,7 @@ public class UtilExcel { | @@ -451,7 +451,7 @@ public class UtilExcel { | ||
| 451 | short format = cell.getCellStyle().getDataFormat(); | 451 | short format = cell.getCellStyle().getDataFormat(); | 
| 452 | if (cell.getCellStyle().getDataFormat()==28 || cell.getCellStyle().getDataFormat()==22||cell.getCellStyle().getDataFormat()==31 | 452 | if (cell.getCellStyle().getDataFormat()==28 || cell.getCellStyle().getDataFormat()==22||cell.getCellStyle().getDataFormat()==31 | 
| 453 | || cell.getCellStyle().getDataFormat() == 58 || cell.getCellStyle().getDataFormat()==14 | 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 | // 如果是date类型则 ,获取该cell的date值 | 456 | // 如果是date类型则 ,获取该cell的date值 | 
| 457 | //return new SimpleDateFormat("yyyy-MM-dd").format(DateUtil.getJavaDate(cell.getNumericCellValue())); | 457 | //return new SimpleDateFormat("yyyy-MM-dd").format(DateUtil.getJavaDate(cell.getNumericCellValue())); | 
| @@ -515,7 +515,7 @@ public class UtilExcel { | @@ -515,7 +515,7 @@ public class UtilExcel { | ||
| 515 | System.out.println(df.format(3.3300)); | 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 | List<List<Object>> data = null; | 519 | List<List<Object>> data = null; | 
| 520 | 520 | ||
| 521 | try { | 521 | try { |