public virtual ActionResult ExportXlsx() { if (!_permissionService.Authorize(StandardPermissionProvider.ManageDestinations)) { return(AccessDeniedView()); } try { var bytes = _exportManager.ExportDestinationsToXlsx(_destinationService.GetAllDestinations(showHidden: true).Where(p => !p.Deleted)); return(File(bytes, MimeTypes.TextXlsx, "destinations.xlsx")); } catch (Exception exc) { ErrorNotification(exc); return(RedirectToAction("List")); } }