Integer curricularYearOneYearAgo = studentLine.getCurricularYearOneYearAgo();
BigDecimal numberOfEnrolledEctsOneYearAgo = studentLine.getNumberOfEnrolledEctsOneYearAgo();
BigDecimal numberOfApprovedEctsOneYearAgo = studentLine.getNumberOfApprovedEctsOneYearAgo();
Integer curricularYearInCurrentYear = studentLine.getCurricularYearInCurrentYear();
Double numberOfEnrolledECTS = studentLine.getNumberOfEnrolledECTS();
Money gratuityAmount = studentLine.getGratuityAmount();
Integer numberOfMonthsExecutionYear = studentLine.getNumberOfMonthsExecutionYear();
String firstMonthOfPayment = studentLine.getFirstMonthOfPayment();
Boolean ownerOfCETQualification = studentLine.getOwnerOfCETQualification();
boolean degreeQualificationOwner = studentLine.isDegreeQualificationOwner();
boolean masterQualificationOwner = studentLine.isMasterQualificationOwner();
boolean phdQualificationOwner = studentLine.isPhdQualificationOwner();
boolean ownerOfCollegeQualification = studentLine.isOwnerOfCollegeQualification();
String observations = studentLine.getObservations();
String lastEnrolmentExecutionYear = studentLine.getLastEnrolledExecutionYear();
String nif = studentLine.getNif();
HSSFRow row = sheet.createRow(i);
addCellValue(row, onNullEmptyString(institutionCode), 0);
addCellValue(row, onNullEmptyString(institutionName), 1);
addCellValue(row, onNullEmptyString(candidacyNumber), 2);
addCellValue(row, onNullEmptyString(studentNumberForPrint), 3);
addCellValue(row, onNullEmptyString(studentName), 4);
addCellValue(row, onNullEmptyString(documentTypeName), 5);
addCellValue(row, onNullEmptyString(documentNumber), 6);
addCellValue(row, onNullEmptyString(degreeCode), 7);
addCellValue(row, onNullEmptyString(degreeName), 8);
addCellValue(row, onNullEmptyString(degreeTypeName), 9);
addCellValue(row, "", 10);
addCellValue(row, onNullEmptyString(countNumberOfDegreeChanges), 11);
addCellValue(row, onNullEmptyString(hasMadeDegreeChange), 12);
addCellValue(row, onNullEmptyString(firstEnrolmentOnCurrentExecutionYear), 13);
addCellValue(row, onNullEmptyString(regime), 14);
addCellValue(row, "", 15);
addCellValue(row, onNullEmptyString(firstRegistrationExecutionYear), 16);
addCellValue(row, onNullEmptyString(countNumberOfEnrolmentsYearsSinceRegistrationStart), 17);
addCellValue(row, onNullEmptyString(countNumberOfEnrolmentsYearsInIntegralRegime), 18);
addCellValue(row, onNullEmptyString(achievedDegreeEcts), 19);
addCellValue(row, onNullEmptyString(numberOfDegreeCurricularYears), 20);
addCellValue(row, onNullEmptyString(curricularYearOneYearAgo), 21);
addCellValue(row, onNullEmptyString(numberOfEnrolledEctsOneYearAgo != null ? numberOfEnrolledEctsOneYearAgo
.toString().replace('.', ',') : ""), 22);
addCellValue(row, onNullEmptyString(numberOfApprovedEctsOneYearAgo != null ? numberOfApprovedEctsOneYearAgo
.toString().replace('.', ',') : ""), 23);
addCellValue(row, onNullEmptyString(curricularYearInCurrentYear), 24);
addCellValue(row,
onNullEmptyString(numberOfEnrolledECTS != null ? numberOfEnrolledECTS.toString().replace('.', ',') : ""),
25);
addCellValue(row,
onNullEmptyString(gratuityAmount != null ? gratuityAmount.toPlainString().replace('.', ',') : ""), 26);
addCellValue(row, onNullEmptyString(numberOfMonthsExecutionYear), 27);
addCellValue(row, onNullEmptyString(firstMonthOfPayment), 28);
addCellValue(row, onNullEmptyString(ownerOfCETQualification), 29);
addCellValue(row, onNullEmptyString(degreeQualificationOwner), 30);
addCellValue(row, onNullEmptyString(masterQualificationOwner), 31);