SpreadsheetGear 2012
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.
Syntax
'Declaration
 
Overloads Function OpenFromStream( _
   ByVal stream As System.IO.Stream, _
   ByVal password As System.String _
) As IWorkbook
'Usage
 
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
)
function OpenFromStream( 
    stream: System.IO.Stream;
    password: System.String
): IWorkbook; 
function OpenFromStream( 
   stream : System.IO.Stream,
   password : System.String
) : IWorkbook;
IWorkbook* OpenFromStream( 
   System.IO.Stream* stream,
   System.string* password
) 
IWorkbook^ OpenFromStream( 
   System.IO.Stream^ stream,
   System.String^ password
) 

Parameters

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

Return Value

The opened workbook.
Remarks

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.

Requirements

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

Reference

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

Send Feedback