Message-ID: <566338017.7813.1711622408944.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_7812_1404260821.1711622408944" ------=_Part_7812_1404260821.1711622408944 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html ExcelApplication.Save(Workbook, System.Web.HttpResponse, String,= Boolean)

ExcelApplication.Save(Workbook, System.Web.HttpResponse, String, Bo= olean)

Description

=20

Streams the specified workbook to the client. It should be the only meth= od that uses the response object, as it automatically sets response headers= , clears the body of the response, and flushes it to the client.

=20
C#
=20
 public virtual void Save(Workbook workbook, System.Web.HttpResponse respon=
se, System.String fileName, boolean openInBrowser)
=20
=20
vb.net
=20
Public Overridable Sub Save(ByVal workbook As Workbook, ByVal response As S=
ystem.Web.HttpResponse, ByVal fileName As String, ByVal openInBrowser As Bo=
olean)
=20
=20

Parameters

=20
workbook
A=20 Workbook object repr= esenting the workbook to save.=20
response
A=20 System.Http.Response obje= ct, usually=20 Page.Response.=20
fileName
Specifies a file name for the workbook. This = name will be displayed in the download dialog when the file is streamed to = the browser.=20
openInBrowser
If true, the spreadsheet will be op= ened in place in Internet Explorer, rather than spawning a seperate Excel w= indow.=20

Exceptions

=20
System.Exception
If there is an error obtainin= g the response stream from the Response object.=20
System.ArgumentException
If the extens= ion of the filename given is invalid for the given workbook. For example, a= file created with Excel 2007, that has macros must be saved with the .xlsm= extension=20

Examples

=20
C#
=20
ExcelApplication xla =3D new ExcelApplication();
Workbook wb =3D xla.Create();

//--- Do something here
xla.Save(wb, Page.Response, "generated.xls", false);
=20
=20
vb.net
=20
Dim xla As New ExcelApplication()
Dim wb As Workbook =3D xla.Create()

'--- Do something here
xla.Save(wb, Page.Response, "generated.xls", False)
=20
------=_Part_7812_1404260821.1711622408944--