Create Workbook Action

Description

Creates a Microsoft Excel workbook and attaches a session name for use in other Excel actions. The file is not saved to the hard disk until the Close Workbook action is used. This action is only useful in conjunction with the other Excel actions found in Automated Workflow.

IMPORTANT: The Excel actions in Automated Workflow use the Microsoft Excel automation engine to perform their work. Because of this, Microsoft Excel must be licensed and installed on the system to use the Excel Actions.

Declaration

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

Example

<AMEXCELCREATEWORKBOOK WORKBOOK="c:\myexceldocument.xls"><AMEXCELSETCELL NEWVALUE="Set this data here" CELLROW="1" CELLCOLUMN="1"><AMEXCELSETCELL NEWVALUE="and this here" CELLROW="2" CELLCOLUMN="1"><AMEXCELCLOSEWORKBOOK>

General Tab Parameters

Workbook: Specifies the name of the Excel file that should be created. The file will not be actually created on the hard disk until the file is saved either manually or using the Close Workbook action.

Text, Required
MARKUP: WORKBOOK="c:\file.xls"

Session name: Specifies the session name to identify this 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 its default.

Text, Optional - Default "Default"
MARKUP: SESSION="YES"

Create from template: Specifies the file name of a template that should be used when creating the file. Excel Templates have the file extension .xlt.

Text, Optional Default= ""
MARKUP: TEMPLATE="c:\mytemplate.xlt"

Workbook is invisible: When selected, specifies that when working with the workbook the Microsoft Excel Window will not be displayed (processing will occur in the background). Usually this check box should be left cleared when building/debugging, but selected for production.

Yes/No, Optional - Default NO
MARKUP:
a) VISIBLE="no"

Overwrite if workbook already exists: When selected, specifies that if the file specified in the Workbook parameter already exists, it will be overwritten.

Yes/No, Optional - Default NO
MARKUP:
a) OVERWRITE="yes"

See Also

Open Workbook, Close Workbook, Add Worksheet, Activate Worksheet, Get Cell, Set Cell, Cells to Dataset, Dataset to Cells