I am working with an excel file which i have to convert to a text file and i have to choose specific rows from that.I have done already but i am stuc with the end of the file bacause i have to delete or skip 3 rows there and their position might change dynamially.So i am sharing the screen of the excel file

Three hightlighted rows i have to skip or delete and their position might change dynamically.I am giving the code which i have used to get specific rows from the file
@Override
public List < String > processSheet(Sheet sheet) {
ActivityLauncher.logConsoleMsg("Processing sheet " + sheet.getSheetName() + " started");
List < String > rows = new ArrayList < String > ();
Iterator < Row > rowIterator = sheet.iterator();
while (rowIterator.hasNext()) {
Row currentRow = rowIterator.next();
StringBuilder row = new StringBuilder();
for (int i = 0; i < currentRow.getLastCellNum(); i++) {
if (currentRow.getRowNum() == 0 || currentRow.getRowNum() == 1 ||
currentRow.getRowNum() == 2 || currentRow.getRowNum() == 3 ||
currentRow.getRowNum() == 4 || currentRow.getRowNum() == 5 ||
currentRow.getRowNum() == 6 || currentRow.getRowNum() == 7 ||
currentRow.getRowNum() == 9 || currentRow.getRowNum() == 10 ||
currentRow.getRowNum() == 11) {
continue;
} else {
Cell currentCell = currentRow.getCell(i, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK);
String cellValue = excelManager.evalCell(currentCell);
if (cellValue.contains("Total")) { //i have tried here
continue;
}
if (!cellValue.isEmpty()) {
row.append(cellValue);
}
//adjusting the cell values with the | or BLANK
if (currentCell == null || currentCell.getCellType() == Cell.CELL_TYPE_BLANK) {
row.append("");
} else {
row.append(SEPARATOR);
}
}
}
if (!row.toString().isEmpty()) {
rows.add(row.toString());
}
}
ActivityLauncher.logConsoleMsg("Processing sheet " + sheet.getSheetName() + " completed");
return rows;
}
I can not skip by position because the position might change by time.
Totalthen skip that row.