コード例 #1
0
        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));
        }