Opens an existing Workbook
Syntax
function Open(FileName: WideString):Integer;
function Open(Stream: TStream):Integer;
function Open(FileName: WideString; Password: WideString):Integer;
function Open(Stream: TStream; Password: WideString):Integer;
FileName |
WideString. 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. |
Stream |
TStream. A stream object that can be used to read the Workbook. |
Password |
WideString. A string that contains the password required to open a protected Workbook. |
Example
This example opens excel file book1.xls from the current folder.
Workbook.Open('book.xls');
This example opens password protected excel Workbook book2.xls with the password 'password'.