Skip to end of metadata
Go to start of metadata

Description

If you pass Save an HttpResponse object object, ExcelWriter will stream the generated file to the client.

C#
vb.net

Parameters

response
A System.Http.Response object, usually Page.Response.

Exceptions

ArgumentNullException
Save will throw this exception if null (C#) or Nothing (VB.NET) is passed to the method.
ArgumentException

Remarks

If the user chooses to open (rather than save) the file, it will open in the browser window. ExcelWriter will set a default name for the file. To set a different file name and/or to open the file in Microsoft Excel, use the signature Save(HttpResponse,string,bool).

You can call Save more than once for a single instance of ExcelTemplate. This allows you to save more than one copy of a generated file, and/or both save the file on the server and stream it to the client.

Examples

C#
vb.net
  • No labels