Ejemplo n.º 1
0
        private ActionResult CreateExcelFile(IEnumerable <ReportRow> rows, string organisationName, ReportType reportType)
        {
            string fileName = $"{EnumHelper.GetDescription(reportType)}_{organisationName}_{_clock.SwedenNow.DateTime.ToSwedishString("yyyy-MM-dd HH:mm")}.xlsx";

            return(File(StatisticsService.CreateExcelFile(rows, reportType), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", fileName));
        }