NativeExcel for .Net Developer's Reference

Factory.OpenWorkbookMethod(Stream)

Opens an existing workbook from a stream and returns IWorkbook interface.

[Visual Basic]
SharedOverloadsPublicFunctionOpenWorkbook(_
ByValinputStreamAsStream_
)AsIWorkbook
[C#]
publicstaticIWorkbookOpenWorkbook(
StreaminputStream
);
[C++]
public:staticIWorkbook*OpenWorkbook(
Stream*inputStream
);
[JScript]
publicstaticfunctionOpenWorkbook(
StreaminputStream
):IWorkbook;

Parameters

inputStream
The input stream containing the workbook to be opened.

Return Value

Returns IWorkbook interface.

Example

[C#]
 IWorkbook book; 
 using (FileStream inputStream = File.OpenRead("book.xls")) {
     book = NativeExcel.Factory.OpenWorkbook(inputStream);
 }

See Also

Factory Class | NativeExcel Namespace | Factory.OpenWorkbook Overload List | IWorkbook Interface