...
|
...
|
@@ -22,6 +22,9 @@ import java.util.ArrayList; |
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
import static org.apache.poi.ss.usermodel.CellType.BLANK;
|
|
|
import static org.apache.poi.ss.usermodel.CellType.STRING;
|
|
|
|
|
|
/**
|
|
|
* shenhailong
|
|
|
* 2020/4/27/14:29
|
...
|
...
|
@@ -147,7 +150,7 @@ public class ExcelUtils { |
|
|
} else {
|
|
|
// System.out.println(hssfCell.getCellType());
|
|
|
|
|
|
if(0==hssfCell.getCellType()){
|
|
|
if(BLANK==hssfCell.getCellType()){
|
|
|
if(DateUtil.isCellDateFormatted(hssfCell)){
|
|
|
//用于转化为日期格式
|
|
|
Date d = hssfCell.getDateCellValue();
|
...
|
...
|
@@ -155,7 +158,7 @@ public class ExcelUtils { |
|
|
rowList.add(formater.format(d));
|
|
|
}
|
|
|
}
|
|
|
hssfCell.setCellType(Cell.CELL_TYPE_STRING);
|
|
|
hssfCell.setCellType(STRING);
|
|
|
rowList.add(String.valueOf(hssfCell.getStringCellValue()));
|
|
|
}
|
|
|
}
|
...
|
...
|
|