f$Excel open workbook
f$Excel open workbook
Open an existing Excel workbook. The name of the workbook is to be entered inclusive of path. If the workbook does not exist, the status –2 is returned. The error message from Excel can be obtained with: p$tdv:sap:add_export(Name,Value,Type,NbDec).
Note that the character "\" must be entered twice ("\\") when entering the path in the file name.
Syntax: | Status = f$Excel('Workbook', 'open', Name ,[password, readonly]) | ||
| Argument | Type | Meaning |
| 'Workbook' | String | Keyword |
| 'open' | String | Keyword |
| Name | String | Name of the Excel workbook. |
| Password | String | Password required to edit the Excel document. (this parameter is optional) |
| Readonly | Integer | 1 – the document is opened in read-only mode. (this parameter is optional) |
Result: | Integer | 0: command executed successfully | |
Example: | Status = f$Excel('Workbook','open','c:\\temp\\test2.xls') | ||