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 @ 2019-07-15 19:52  Andrew_F  阅读(1198)  评论(0编辑  收藏  举报