Sheet to Workbook
The Sheet to Workbook function is used to export the current worksheet from the report to another Excel workbook.
Settings | |
|---|---|
Directory | The directory where the Excel workbook to export the worksheet to exists. If this is left blank, the Reports Directory of the current project is used (as defined in the Project Explorer). If this is not a full path reference, the setting is used as subfolders of the Reports Directory. This can be a fixed name or cell reference where the cell reference contains the directory. Fixed names can contain XLReporter Name Types like {YYYY}, {MMM}, etc. See the Name Types chapter for the full list of supported keywords. Note that some keywords, such as {DATIM} contain illegal directory characters when evaluated. These keywords cannot be used for the directory. |
Workbook Name | The name of the workbook to export the worksheet to. This can be a fixed name or cell reference where the cell reference contains the directory. Fixed names can contain XLReporter Name Types like {YYYY}, {MMM}, etc. If the Workbook does not exist, it will be created. |
Target Sheet | If this setting is specified, when the worksheet is copied to the workbook it is renamed to what is specified, otherwise the name of the worksheet in the report is used. |
Overwrite | If Overwrite is set to Yes and the Target Worksheet name exists in the Target Workbook, it is deleted and the new worksheet from the source is inserted as the last worksheet tab in the Target Workbook. If Overwrite is set to No and the worksheet name already exists in the workbook being exported to, the following occurs:
|
Example
A batch report template is created to show all the data collected over a specific batch. This template contains one worksheet, and each batch report is its own workbook. However, management would like to be able to compare all the batches run over the day by having a workbook for the day that has a worksheet for every batch run.
To accomplish this, a Sheet to Workbook management function is configured in the batch report template to copy the batch report worksheet to the daily report workbook for management. The settings are:
Setting | Value |
|---|---|
Directory | Daily Batch |
Workbook Name | Daily Batch {YYYY}-{MM}-{DD} |
Target Sheet | {RG000} |
Overwrite | No |
Note, RG000 holds the name of the batch.