}
public ActionForward exportInfoToExcel(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
HttpServletResponse response) throws FenixServiceException {
final SearchStudentsByDegreeParametersBean searchBean = getOrCreateSearchParametersBean();
if (searchBean == null) {
return null;
}
final List<RegistrationWithStateForExecutionYearBean> registrations = search(searchBean);
try {
String filename = getResourceMessage("label.students");
Degree degree = searchBean.getDegree();
DegreeType degreeType = searchBean.getDegreeType();
ExecutionYear executionYear = searchBean.getExecutionYear();
if (degree != null) {
filename += "_" + degree.getNameFor(executionYear).getContent().replace(' ', '_');
} else if (degreeType != null) {
filename += "_" + degreeType.getLocalizedName().replace(' ', '_');
}