SpreadsheetGear 2023
OpenFromStream(Stream,String) Method

SpreadsheetGear Namespace > IWorkbooks Interface > OpenFromStream Method : OpenFromStream(Stream,String) Method
The stream containing the workbook to open.
The password to use when opening the workbook.
Open an existing workbook in a newly created instance of IWorkbook.
Overloads Function OpenFromStream( _
   ByVal stream As System.IO.Stream, _
   ByVal password As System.String _
) As IWorkbook
Dim instance As IWorkbooks
Dim stream As System.IO.Stream
Dim password As System.String
Dim value As IWorkbook
value = instance.OpenFromStream(stream, password)
IWorkbook OpenFromStream( 
   System.IO.Stream stream,
   System.string password


The stream containing the workbook to open.
The password to use when opening the workbook.

Return Value

The opened workbook.

The stream must consist solely of a file which SpreadsheetGear is able to read. If the stream is not seekable, this method will copy the stream to a MemoryStream and read the workbook from the MemoryStream.

The various workbook settings which make a workbook read-only in an end user workbookSet have no affect at this level. These settings are available as IWorkbook properties.


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


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