I want to dynamically build an Excel file using asp.net (with OpenXML), on Azure. Ideally (I think) I'd prefer to not generate persistent files that I then have to clean up, I'd rather build the file in-memory and send it back.
I'm just feeling a little out of touch as to the best way to do this; would the best way be to create the spreadsheet - using the
SpreadsheetDocument Create(Stream stream, SpreadsheetDocumentType type);
or
SpreadsheetDocument Create(System.IO.Packaging.Package package, SpreadsheetDocumentType type);
?
I should be able to use the first overload shown above to serve the file out through the HTTP response stream (like this), right?
I'm not familiar with the System.IO.Packaging namespace (and WindowsBase.dll from which it comes) - but since it's "IO" I assume some kind of persistent file creation might be involved?