...
|
...
|
@@ -22,8 +22,7 @@ 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;
|
|
|
import static org.apache.poi.ss.usermodel.CellType.*;
|
|
|
|
|
|
/**
|
|
|
* shenhailong
|
...
|
...
|
@@ -59,7 +58,7 @@ public class ExcelUtils { |
|
|
}
|
|
|
totoalRows = xssfSheet.getLastRowNum();
|
|
|
//读取row
|
|
|
for (int rowIndex = 2; rowIndex <= totoalRows; rowIndex++) {
|
|
|
for (int rowIndex = 1; rowIndex <= totoalRows; rowIndex++) {
|
|
|
XSSFRow xssfRow = xssfSheet.getRow(rowIndex);
|
|
|
|
|
|
if (xssfRow == null) {
|
...
|
...
|
@@ -145,12 +144,12 @@ public class ExcelUtils { |
|
|
//读取列
|
|
|
for (int cellIndex = 0; cellIndex < totalCells; cellIndex++) {
|
|
|
HSSFCell hssfCell = hssfRow.getCell(cellIndex);
|
|
|
if (hssfCell == null) {
|
|
|
if (hssfCell == null || String.valueOf(hssfCell)=="") {
|
|
|
rowList.add("");
|
|
|
} else {
|
|
|
// System.out.println(hssfCell.getCellType());
|
|
|
|
|
|
if(BLANK==hssfCell.getCellType()){
|
|
|
if(NUMERIC==hssfCell.getCellType()){
|
|
|
if(DateUtil.isCellDateFormatted(hssfCell)){
|
|
|
//用于转化为日期格式
|
|
|
Date d = hssfCell.getDateCellValue();
|
...
|
...
|
|