原因:存在样式的空行。会被统计进来。所以主要的问题是要判断是否是空行。
断空行的方法 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; }else { break; } } return true; }