if (individualCandidacyProcess.isCandidacyRejected()) {
continue;
}
IndividualCandidacyPersonalDetails personalDetails = erasmusIndividualCandidacyProcess.getPersonalDetails();
Row row = spreadsheet.addRow();
row.setCell(0, erasmusIndividualCandidacyProcess.getProcessCode());
if (personalDetails.getPerson() != null && personalDetails.getPerson().getUsername() != null) {
row.setCell(1, personalDetails.getPerson().getUsername());
} else {
row.setCell(1, "");
}
row.setCell(2, erasmusIndividualCandidacyProcess.getPersonalDetails().getName());
row.setCell(3, personalDetails.getDateOfBirthYearMonthDay() != null ? personalDetails.getDateOfBirthYearMonthDay()
.toString("dd/MM/yyyy") : "N/A");
row.setCell(4, erasmusIndividualCandidacyProcess.getPersonalDetails().getCountry().getCountryNationality()
.getContent());
row.setCell(5, erasmusIndividualCandidacyProcess.getCandidacy().getMobilityStudentData().getSelectedOpening()
.getMobilityAgreement().getUniversityUnit().getName());