|
|
|
@ -256,10 +256,11 @@ namespace Myshipping.Application
|
|
|
|
|
Directory.CreateDirectory(fileFullPath);
|
|
|
|
|
}
|
|
|
|
|
var fileName = string.Format("订舱{0}.xls", DateTime.Now.Ticks);
|
|
|
|
|
_logger.LogInformation("导出excel:" + Path.Combine(fileFullPath, fileName));
|
|
|
|
|
var filestream = new FileStream(Path.Combine(fileFullPath ,fileName), FileMode.OpenOrCreate, FileAccess.ReadWrite);
|
|
|
|
|
excelwork.Write(filestream);
|
|
|
|
|
var result = new FileStreamResult(filestream, "application/octet-stream") { FileDownloadName = fileName };
|
|
|
|
|
return Path.Combine(fileFullPath, fileName);
|
|
|
|
|
var result = new FileStreamResult(new FileStream(Path.Combine(fileFullPath, fileName), FileMode.Open), "application/octet-stream") { FileDownloadName = fileName };
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|