作者:乔山办公网日期:
返回目录:excel表格制作
项目zhidao中常用的内写法:
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;
}
项目中常抄用的写法知:
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;
}
poi没有提供原生的方法,需要自己写,参考我写的。publicstaticbooleanisRowEmpty(Rowrow){for(intc=row.getFirstCellNum();c
if(row == null){
continue;
}