Close Workbook

Closes a Microsoft Excel workbook previously created or opened in an established Excel session. If modifications have been made, the document will be saved when closed. Mainly used to save and close an Excel document that was modified with prior Excel steps and ends the associated session.

Declaration

<AMEXCELCLOSEWORKBOOK SESSIONNAME="text" SAVE="yes/no">

See Also: Excel Actions Example, Create Workbook, Open Workbook, Add Worksheet, Activate Worksheet, Get Cell, Set Cell, Cells to Dataset, Dataset to Cells

AWE's Excel actions use Microsoft's Excel automation engine to perform their work. Therefore, Microsoft Excel must be licensed and installed on the system in order for these actions to work. Excel objects run in the context of the user executing them. If EFT is running as a Local System, then the Excel object is executed using the Local System profile. Before using an Excel action in Event Rules, refer to Globalscape Knowledgebase article #11089 for important information.

This action is only useful in conjunction with other Excel actions. It is not possible to use AWE's Excel actions on a spreadsheet that was not opened by the Open Workbook action or created by the Create Workbook action.

General Tab

Property

Type

Required

Default

Markup

Description

Session Name

Text

Yes

ExcelSess1

SESSION="ExcelSess7"

The session name to identify which document should be closed from prior Excel steps. Numerous sessions can exist within a single task allowing several Excel documents to be open simultaneously. If working with only one document, this can remain at the default session name, which is Excelsess1.

Do not save changes

Yes/No

No

No

RESULTDATASET="datasetname"

If set to YES, the document should be closed but not saved. The default behavior is to save the document when it is closed.