You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.
@matfricker@Yousefjb if you do the below instead you won't get this error, it will return a FileContentResult instead of FileStreamResult however. If you need a FileStreamResult you would have to create a new Memorystream and pass it the byte array. using (var memoryStream = new MemoryStream()) //creating memoryStream { workbook.Write(memoryStream); var byteArray = memoryStream.ToArray(); return File(byteArray , "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "test.xlsx"); }
I have to create a new xlsx from server side (without save it on server side), but I have to download the file on client side.
I have this error " Cannot access a closed Stream"
This is the code. Any suggestions?
[HttpGet]
public async Task DownloadXLS()
{
try
{
The text was updated successfully, but these errors were encountered: