Skip to main content
Skip table of contents

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')
Status = f$Excel('Sheet', 'open', 'Table2')
Status = f$Excel('Cell', 'set',2,1, '1')
Status = f$Excel('Close',0)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.