public async Task <IActionResult> DownloadExcel() { ReportsService rs = new ReportsService(); var pdf = rs.GetExcel(); string fileName = Guid.NewGuid() + ".xlsx"; pdf.Save(fileName, Aspose.Cells.SaveFormat.Xlsx); return(GetFile(fileName)); }