Exemplo n.º 1
0
        public FileResult GetExcel(string buildId, string energyCode, string type, string regionIDs, string date)
        {
            string[] regions = regionIDs.Split(',');

            string basePath             = HttpContext.Server.MapPath("~/App_Data/");
            RegionReportService service = new RegionReportService();
            Excel excel = service.ExportReportToExcel(basePath, buildId, energyCode, regions, date, type);

            return(File(excel.Data, "application/ms-excel", excel.Name));
        }