for (int i = 2; i < sheet1.getRows(); i++) {
//属性设置异常标识
Boolean valueFlag = true;
Cell[] row = sheet1.getRow(i);
if(row==null){
continue;
}
Integer totalColnumInRow=sheet1.getColumns();
Integer blankColnumInRow=0;
for (int m = 0; m < sheet1.getColumns(); m++) {
String content = sheet1.getCell(m, i).getContents();
if(StringUtils.isBlank(content))
{
blankColnumInRow++;
}
........
}
//判断空行数,判断整行为空
if(blankColnumInRow == totalColnumInRow)
{
continue;
}else{
业务代码
}
poi excel导入时会多出空行的解决方法
最新推荐文章于 2024-06-30 03:19:56 发布