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.
workbookA Workbook object representing the workbook to save.
responseA System.Http.Response object, usually Page.Response.
fileNameSpecifies a file name for the workbook. This name will be displayed in the download dialog when the file is streamed to the browser.
openInBrowserIf true, the spreadsheet will be opened in place in Internet Explorer, rather than spawning a seperate Excel window.
contentTypeThe content-type header sent to the browser with the generated spreadsheet.
System.ExceptionIf there is an error obtaining the response stream from the Response object.
System.ArgumentExceptionIf 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.
If the content type is invalid given is invalid for the given workbook.