SpreadsheetGear 2023
SaveToStream(FileFormat) Method

SpreadsheetGear Namespace > IWorkbook Interface > SaveToStream Method : SaveToStream(FileFormat) Method
The file format to save the workbook in.
Saves this workbook to a newly created stream in the specified FileFormat.
Overloads Function SaveToStream( _
   ByVal fileFormat As FileFormat _
) As System.IO.Stream
Dim instance As IWorkbook
Dim fileFormat As FileFormat
Dim value As System.IO.Stream
value = instance.SaveToStream(fileFormat)
System.IO.Stream SaveToStream( 
   FileFormat fileFormat


The file format to save the workbook in.

The newly created stream is an internal SpreadsheetGear memory based stream which is more efficient than System.IO.MemoryStream.

Note that the various workbook settings which make a workbook read-only in an end user workbookSet have no affect at this level.


Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also


IWorkbook Interface
IWorkbook Members
Overload List
Save Method
SaveAs(String,FileFormat) Method
SaveToMemory(FileFormat) Method
Open(String) Method
OpenFromMemory(Byte[]) Method
OpenFromStream(Stream) Method
Protect Method
Unprotect Method