|
|
Programmer's Reference >
ExcelApplication API >
ExcelApplication > Save
Save Method
Signature:
public void Save ( Workbook workbook
, System.Web.HttpResponse response
, String fileName
, boolean openInBrowser
)
Description:
Streams the specified workbook to the client. It should be the only method that uses the response object, as it automatically sets response headers, clears the body of the response, and flushes it to the client.
Parameters:
|
workbook |
A Workbook object representing the workbook to save. |
|
response |
A System.Http.Response object, usually Page.Response. |
|
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. |
|
openInBrowser |
If true, the spreadsheet will be opened in place in Internet Explorer, rather than spawning a seperate Excel window. |
Exceptions:
|
System.Exception |
If there is an error obtaining the response stream from the Response object. |
Examples:
[csharp]
ExcelApplication xla = new ExcelApplication();
Workbook wb = xla.Create();
// Do something here
xla.Save(wb, Page.Response, "generated.xls", false);
[vbnet]
Dim xla As New ExcelApplication()
Dim wb As Workbook = xla.Create()
' Do something here
xla.Save(wb, Page.Response, "generated.xls", False)

Copyright 2006 © SoftArtisans, Inc. All Rights Reserved.
|
|
|