Quantcast
Channel: NPOI
Viewing all articles
Browse latest Browse all 1621

Commented Unassigned: How to stream .xlsx file back to client (browser) without first saving it to file system [12266]

$
0
0
Could you please show a code example for (creating and) streaming a .xlsx fiel back to the client.
I have it running for .xls and works perfect, but for .xlsx didn't get it working.

Nice component ! Keep up the good work !

Thanks.
Rishi
Comments: ** Comment from web user: pfranceschini **

let's say three.

I used the same code I found in XLS example, but as soon as I write the stream to Response.OutputStream
[ --> MyGetExcelStream(workbook).WriteTo(Response.OutputStream) ]
I receive the following error:


Cannot access a closed Stream.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ObjectDisposedException: Cannot access a closed Stream.


Viewing all articles
Browse latest Browse all 1621

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>