Saves the worksheet into a stream.
Namespace:
C1.Silverlight.ExcelAssembly: C1.Silverlight.Excel.5 (in C1.Silverlight.Excel.5.dll)
Syntax
C# |
---|
public void Save( Stream stream ) |
Visual Basic |
---|
Public Sub Save ( _ stream As Stream _ ) |
Parameters
- stream
- Type: System.IO..::..Stream
Stream where the worksheet is saved.
Remarks
This method allows saving the workbook directly into streams without using
temporary files. Typical uses include saving books to web page response streams
or mail attachment streams.
Examples
The code below saves a C1XLBook into a MemoryStream, clears
the book, then loads it back from the same stream.
Copy CodeC#

// save book into new MemoryStream MemoryStream ms = new MemoryStream(); _book.Save(ms); // clear book _book.Clear(); // load it back from the MemoryStream ms.Position = 0; _book.Load(ms); |