NativeExcel for .Net Developer's Reference

Factory.OpenWorkbookMethod(String)

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

[Visual Basic]
SharedOverloadsPublicFunctionOpenWorkbook(_
ByValFilenameAsString_
)AsIWorkbook
[C#]
publicstaticIWorkbookOpenWorkbook(
stringFilename
);
[C++]
public:staticIWorkbook*OpenWorkbook(
String*Filename
);
[JScript]
publicstaticfunctionOpenWorkbook(
StringFilename
):IWorkbook;

Parameters

Filename
A string that indicates the name of the file to be opened. You can include a full path; if you don't, workbook opens the file in the current folder.

Return Value

Returns IWorkbook interface.

Example

[C#]
IWorkbook book = NativeExcel.Factory.OpenWorkbook("book.xls");

See Also

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