@Override public List<SeekerAimsTO> buildParticipants() throws Exception { boolean mark = false; List<Row> participantRows = new ArrayList<Row>(); for (int i = 0; i < sheetParticipants.getLastRowNum(); i++) { Row row = sheetParticipants.getRow(i); if (mark) { if (row != null) { participantRows.add(row); } } if (row != null && row.getCell(ParticipantCols.NAME.getColumn()) != null) { String string = row.getCell(ParticipantCols.NAME.getColumn()).toString(); if (string.contains(ParticipantCols.NAME.getHeader())) { mark = true; } if (mark) { if (row == null || (row.getCell(ParticipantCols.NAME.getColumn()) == null) || row.getCell(ParticipantCols.NAME.getColumn()).toString().isEmpty()) { mark = false; } } } } ProgramHeaderTO buildProgramDetails = buildProgramDetails(); List<SeekerAimsTO> processRows = processRows(participantRows); for (SeekerAimsTO seekerAims : processRows) { seekerAims.setCountry(buildProgramDetails.getCountry()); } sLogger.info("Participant list:" + participantRows.size()); return processRows; }