Saves a specified Workbook as a BIFF8 format (Excel 97 or later).xls file.

 public virtual void Save(Workbook workbook, System.IO.Stream stream)
Public Overridable Sub Save(ByVal workbook As Workbook, ByVal stream As System.IO.Stream)

A Workbook object representing the workbook to save.

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.

If there is a problem creating, opening, or writing to the file specified, or reading from the workbook object.


          ExcelApplication oExcelApp = new ExcelApplication();
          Workbook wb = oExcelApp.Create();
          FileStream fstream = new FileStream(@"C:\temp\outfile.xls",
               FileMode.Create);
          oExcelApp.Save(wb,fstream);
        

          Dim oExcelApp As New ExcelApplication()
          Dim wb As Workbook = oExcelApp.Create()
          Dim fstream As New FileStream("C:\temp\outfile.xls", _
               FileMode.Create)
          oExcelApp.Save(wb, fstream)