Create Workbook

Commonly used to create a new Microsoft Excel document and associate it with a session to allow other Excel actions to be performed by linking those actions to the specified session. The newly created workbook automatically becomes the active workbook. Any modifications made to the workbook is saved to memory and not saved to the hard disk until the Close Workbook action is used or if the workbook is saved manually by a user. Creates a Microsoft Excel workbook and attaches a session name for use in other Excel actions.

Declaration

<AMEXCELCREATEWORKBOOK WORKBOOK="text" SESSIONNAME="text" VISIBLE="yes/no" OVERWRITE="yes/no" TEMPLATENAME="text">

See Also: Excel Actions Example, Open Workbook, Close 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

Workbook

Text

Yes

(Empty)

WORKBOOK="c:\file.xls"

The path and file name of the Excel workbook that should be created.

NOTE: The file will initially be saved to memory. It will not be saved to the hard disk until the file is saved either manually or by using the Close Workbook action.

Session Name

Text

Yes

Sheet1

SESSION="mySession"

The session name to establish and identify the newly created document in subsequent Excel steps. This allows several Excel files to be open simultaneously. If only working with one document at a time, this value should not be changed from it's default.

Create from Template

Text

No

(Empty)

TEMPLATE=

"c:\temp\template.xlt"

If enabled, specifies that a template should be used when creating the file. Enter the path and file name of the desired template in the text box. Excel templates have the file extension.xlt.

Workbook is invisible

Yes/No

No

No

VISIBLE="NO"

If enabled, specifies that the Microsoft Excel Window will not be displayed and all processing will occur in the background. This option should be left unchecked during task construction and debugging, but enabled for production. The workbook is visible by default.

Overwrite if workbook already exists

Yes/No

No

No

OVERWRITE="YES"

If enabled, specifies that if the file specified in the Workbook parameter already exists, it will be overwritten.