Write to Response for web projects
It is possible to write to the Response object and skip writing the file on hard-drive.
Here is some sample code:
'Create an instance of the object that generates Excel files
Dim xls As New ExcelDocument
'Choose a name for the xls file
Dim shortFileName As String = "ListData.xls"
'Start to prepare the Response
Response.AppendHeader("content-disposition", "attachment; filename=" + shortFileName)
Response.ContentType = "application/octetstream"
Response.Clear()
'Generate the file and prompt the "Open or Save Dialog Box"
xls.easy_WriteExcelFile(Response.OutputStream, sLicense, sLicenseKey)
'Finishing the job
xls.Dispose()
Response.End()