...
Description |
---|
Excerpt |
---|
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. |
Signature | ||||
---|---|---|---|---|
| ||||
public virtual void Save(Workbook workbook, System.Web.HttpResponse response, System.String fileName, boolean openInBrowser)
{signature}{signature: |
Signature | ||||||
---|---|---|---|---|---|---|
| }
| |||||
Public Overridable Sub Save(ByVal workbook As Workbook, ByVal response As System.Web.HttpResponse, ByVal fileName As String, ByVal openInBrowser As Boolean)
{signature}
{parameters}
{param:workbook}A [Workbook|Workbook] object representing the workbook to save.{param}
{param:response}A {msdn: |
Parameters |
---|
Param | ||||
---|---|---|---|---|
| ||||
A Workbook object representing the workbook to save. |
Param | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
A
usually [|Page.Response].{param} {param: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.{param} {param:openInBrowser}If true, the spreadsheet will be opened in place in Internet Explorer, rather than spawning a seperate Excel window.{param} {exceptions} {exception:System.Exception}If there is an error obtaining the response stream from the Response object.{exception} {exception:System.ArgumentException}If the extension 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{exception} {example}{code:csharp|title=C#}. |
Param | ||||
---|---|---|---|---|
| ||||
Specifies a file name for the workbook. This name will be displayed in the download dialog when the file is streamed to the browser. |
Param | ||||
---|---|---|---|---|
| ||||
If true, the spreadsheet will be opened in place in Internet Explorer, rather than spawning a seperate Excel window. |
Exceptions |
---|
Exception | ||||
---|---|---|---|---|
| ||||
If there is an error obtaining the response stream from the Response object. |
Exception | ||||
---|---|---|---|---|
| ||||
If the extension 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 |
Example | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|