EmailWorksheet macro
The EmailWorksheet macro is used to load the worksheet with passed context (item,
location and period) and email the worksheet to the user. This macro is executed at scenario
level.
The macro parameters determine the context and worksheet to be emailed. The multi panel worksheets are not supported in this macro.
For executing the macro, the value for the Command field must be specified in this format:
EmailWorksheet (Export type, Worksheet Name, User, [Item Passed], [Location Passed], [Period Passed]).
Note: The optional parameters are specified in [ ].
This table lists the parameters used to execute the EmailWorksheet macro:
Parameter Name | Description |
---|---|
Export Type | The format of file in which the worksheet is to be sent. Possible options:
|
Worksheet Name | The name of the worksheet to execute and email. |
User | The email recipient for the worksheet. Note: The user
must have access to the worksheet.
|
Item Passed | The item selection passed to the worksheet. This value can be a single element or
set of elements. Note:
|
Location Passed | The location selection passed to the worksheet. This value can be a single
element or set of elements. Note:
|
Period Passed | The period selection passed to the worksheet. This value can be a single element
or set of elements. Note:
|
This table lists examples of the EmailWorksheet macro:
Requirement | Syntax |
---|---|
Execute Demand Margin Analysis worksheet with default item, location and period selection from worksheet definition and email the PDF output to user ‘Scott’. |
EmailWorksheet("PDF","Demand Margin Analysis","Scott"). EmailWorksheet("PDF","Demand Margin Analysis","Scott","","",""). |
Execute Demand Essentials worksheet with default item, location and period selection from worksheet definition and email the XLS output to user ‘Harry’. | EmailWorksheet("XLS","Demand Essentials","Harry","","",""). |
Execute Forecast Accuracy Analysis worksheet with Brand A item node, default location selection and Rolling Weeks period node and email the PDF output to user ‘Harry’. | EmailWorksheet("PDF","Forecast Accuracy Analysis","Harry","Brand A","","Rolling Weeks"). |