//首先根据sheet.getRow(i)获取行HSSFRow dataRow = sheet.getRow(i);Boolean aa=isRowEmpty(dataRow );//如果aa为true则是空,如果为false,则改行有数据public boolean isRowEmpty(Row row) {for (int c = row.getFirstCellNum(); c ro
//首先根据sheet.getRow(i)获取行
HSSFRow dataRow = sheet.getRow(i);
Boolean aa=isRowEmpty(dataRow );
//如果aa为true则是空,如果为false,则改行有数据
public boolean isRowEmpty(Row row) {
for (int c = row.getFirstCellNum(); c < row.getLastCellNum(); c++) {
Cell cell = row.getCell(c);
if (cell != null && cell.getCellType() != Cell.CELL_TYPE_BLANK)
return false;
}
return true;
}