When i try to save a Workbook as CSV in de Response from my asp.net page i get an ObjectDisposedException with the message 'Cannot access a closed Stream. '; saving the Workbook as Excel works as expected.
I use this code:
wb.Save(fileName, FileFormatType.Default, SaveType.OpenInExcel, Response);
to save the Workbook in Excel.
I use this code:
wb.Save(fileName, FileFormatType.CSV, SaveType.OpenInExcel, Response);
to save the Workbook in CSV.
I have tried different SaveTypes but they all give the ObjectDisposedException.