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

 public static boolean isRowEmpty(Row row){
        for (int i = row.getFirstCellNum(); i < row.getLastCellNum(); i++) {
            Cell cell = row.getCell(i);
            if (cell != null && cell.getCellType() != Cell.CELL_TYPE_BLANK){
                return false;
            }
        }
        return true;
  }

猜你喜欢

转载自blog.csdn.net/fly_captain/article/details/81388216