BaseXlsImporter extends BaseImporter<Row, Cell> { public boolean isRowEmpty(Row row) { if (row == null || row.getFirstCellNum() < 0) { return true; } for (Cell next : row) { String value = next.getStringCellValue(); if (!StringUtils.isEmpty(value)) { return false; } } return true; }  @Override int countRows(byte[] bytes, int sheetIndex); Workbook createReader(byte[] bytes, int cacheSize); Workbook createWorkbook(byte[] bytes); @Override Double getNumericValueWithDefault(Cell cell, ImportField field); @Override boolean isPercentageCorrectionSupported(); boolean isRowEmpty(Row row); T processRows(Sheet sheet, int firstRowIndex, int colIndex, Class<T> clazz);  }
@Test public void testIsRowEmpty() throws IOException { assertTrue(importer.isRowEmpty(null)); byte[] bytes = readFile("importertest.xlsx"); Workbook wb = importer.createWorkbook(bytes); Sheet sheet = wb.getSheetAt(0); assertFalse(importer.isRowEmpty(sheet.getRow(0))); assertTrue(importer.isRowEmpty(sheet.getRow(7))); }