Skip to main content
Skip table of contents

f$Excel close workbook


f$Excel close workbook

Close the current workbook. If desired, an argument can be entered as well to specify if the workbook should be saved. If this argument is not entered as well, Excel asks if the worksheet is to be saved, if relevant.

Syntax:

Status = f$Excel('Workbook', 'close' [, SaveYesNo] )

 

Argument

Type

Meaning

 

'Workbook'

String

Keyword

 

'close'

String

Keyword

 

SaveYesNo

Integer

This argument is optional.
Value 0 means do not save, value 1 means save

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('Workbook', 'close' )
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.