// GET: Patient/Export public FileStreamResult Export(string pid, string nhc, string nuhsa, string name, string surnames, PatientStatus?patientStatus, string birthFrom, string birthTo, string sorting) { var patientData = _patientService.DeepSearch(pid, nhc, nuhsa, name, surnames, patientStatus, birthFrom, birthTo, sorting, 1, ExportSize); var dataStream = SpreadsheetManager.ExportPatientData(patientData); return(File(dataStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", Strings.ExportedFileName + ".xlsx")); }