解决POI读取Excel如何判断行是不是为空

 

源码:

public static 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;
}
posted @ 2018-06-07 14:33  静候。  阅读(7459)  评论(0)    收藏  举报