java excel poi导入 过滤空行的方法 判断是否是空行

来源:互联网 发布:源码之家easck 编辑:程序博客网 时间:2024/06/05 01:52
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;


}
2 1
原创粉丝点击