StateDMI / Command / SetExcelWorksheetViewProperties
Overview
The SetExcelWorksheetViewProperties
command sets view properties associated with an Excel worksheet,
for example to facilitate automated creation of Excel workbooks.
Additional properties will be added in the future.
Currently the command can set the following properties:
- Freeze pane for rows and columns
StateDMI uses the Apache POI software to read/write the Excel file and consequently functionality is constrained by the features of that software package.
Command Editor
The following dialog is used to edit the command and illustrates the syntax of the command. See also the full-size image.
SetExcelWorksheetViewProperties
Command Editor
Command Syntax
The command syntax is as follows:
SetExcelWorksheetViewProperties(Parameter="Value",...)
Command Parameters
Parameter | Description | Default |
---|---|---|
OutputFile required |
The name of the Excel workbook file (*.xls or *.xlsx ) to write, as an absolute path or relative to the command file location. The Excel file must have been opened with a previous command. Can be specified with ${Property} . |
None – must be specified. |
Worksheet |
The name of the worksheet in the workbook to set view properties. Can be specified with ${Property} . Multiple worksheets can be specified by separating the names with commas. Worksheet names can be specified with * wildcard to match multiple worksheets. |
If not specified, set properties for the first worksheet. |
KeepOpen |
Indicate whether to keep the Excel file open (True ) or close after creating (False ). Keeping the file open will increase performance because later commands will not need to reread the workbook. |
False |
FreezePaneColumnRightOfSplit |
The column to the right of the freeze pane split, using notation B, etc. (specifying A will have no effect). | Columns will not be frozen. |
FreezePaneRowBelowSplit |
The row below the freeze pane split, specified as row number 2 + (specifying 1 will have no effect). |
Rows will not be frozen. |
Examples
See the automated tests.
Troubleshooting
See the main troubleshooting documentation.
See Also
NewExcelWorkbook
commandReadExcelWorkbook
command