|
|
Programmer's Reference >
ExcelApplication API >
ExcelApplication > Save
Save Method
Signature:
public void Save ( Workbook workbook
, System.IO.Stream stream
)
Description:
Saves a specified Workbook as a BIFF8 format (Excel 97 or later).xls file.
Parameters:
|
workbook |
A Workbook object representing the workbook to save. |
|
stream |
The output stream to write to. This stream must be open and writable. ExcelWriter will not close this stream; the calling program is responsible for closing the stream and releasing the resource. |
Exceptions:
|
System.Exception |
If there is a problem creating, opening, or writing to the file specified, or reading from the workbook object. |
Example:
[csharp]
ExcelApplication oExcelApp = new ExcelApplication();
Workbook wb = oExcelApp.Create();
FileStream fstream = new FileStream(@"C:\temp\outfile.xls",
FileMode.Create);
...
oExcelApp.Save(wb,fstream);

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