public async Task <IActionResult> DownloadLogAsync(CancellationToken cancellationToken) { InitUserInfo(); var result = await _purchaseOrderDetailService.GenerateUploadLogExcel(cancellationToken); var fileName = "PurchaseOrderDetail.xlsx"; byte[] fileBytes = System.IO.File.ReadAllBytes(result); return(File(fileBytes, "application/xlsx", fileName)); }