SET

The SET command is used to change the current context sheet, sheet column widths and sheet settings of the specified sheet.

To change the context sheet, use the OBJECT keyword with a value of *CONTEXT.

 

                                                         Required

 

 SET ----------------------------------------------------------->

 

          >-- OBJECT ----------- *CONTEXT----------------------->

 

          >-- SHEET ------------ value -------------------------|

 

Keywords

OBJECT

*CONTEXT

SHEET

A specific sheet name that must exist in the document.

 

To change the sheet columnwidths, use the OBJECT keyword with a value of *COLUMNWIDTH.

 

                                                         Required

 

 SET ----------------------------------------------------------->

 

          >-- OBJECT ----------- *COLUMNWIDTH------------------->

 

                                                         Optional

 

          >-- SHEET ------------ value ------------------------->

 

          >-- WIDTH ------------ value ------------------------->

 

          >-- RANGE ------------ n,n ---------------------------|

 

Keywords

OBJECT

*COLUMNWIDTH

SHEET

A specific sheet name can be entered otherwise the current context sheet is used.

WIDTH

Width of column. The default value is 2560 units.

RANGE

Range of columns. A single column number or two comma separated column numbers to specify a range of columns.

 

To hide rows, use the OBJECT keyword with a value of *HIDEROW.

 

                                                         Required

 

 SET ----------------------------------------------------------->

 

          >-- OBJECT ----------- *HIDEROW----------------------->

 

                                                         Optional

 

          >-- SHEET ------------ value ------------------------->

 

          >-- RANGE ------------ n,n ---------------------------|

 

Keywords

OBJECT

*HIDEROW

SHEET

A specific sheet name can be entered otherwise the current context sheet is used.

RANGE

Range of rows. A single row number or two comma separated row numbers to specify a range of rows.

 

To hide columns, use the OBJECT keyword with a value of *HIDECOLUMN.

 

                                                         Required

 

 SET ----------------------------------------------------------->

 

          >-- OBJECT ----------- *HIDECOLUMN-------------------->

 

                                                         Optional

 

          >-- SHEET ------------ value ------------------------->

 

          >-- RANGE ------------ n,n ---------------------------|

 

Keywords

OBJECT

*HIDECOLUMN

SHEET

A specific sheet name can be entered otherwise the current context sheet is used.

RANGE

Range of columns. A single column number or two comma separated numbers to specify a range of columns.

 

 

To change the sheet settings, use the OBJECT keyword with a value of *SHEET.

 

                                                         Required

 

 SET ----------------------------------------------------------->

 

          >-- OBJECT ----------- *SHEET ------------------------>

 

                                                         Optional

 

          >-- SHEET ------------ value ------------------------->

 

          >-- SELECTED --------- *YES -------------------------->

                                 *NO

 

          >-- DISPLAYGRID ------ *YES -------------------------->

                                 *NO

 

          >-- PRINTGRID -------- *YES -------------------------->

                                 *NO

 

          >-- PRINTAREA -------- value ------------------------->

 

          >-- PRINTTOFIT ------- *YES -------------------------->

                                 *NO

 

          >-- PROTECT ---------- *YES -------------------------->

                                 *NO

 

          >-- PASSWORD --------- value ------------------------->

 

          >-- FREEZE ----------- value ------------------------->

 

          >-- MARGIN ----------- value ------------------------->

 

          >-- HEADER ----------- *LEFT ------------------------->

                                 *RIGHT

                                 *CENTER

 

          >-- FOOTER ----------- *LEFT ------------------------->

                                 *RIGHT

                                 *CENTER

 

          >-- CONTENT ---------- value -------------------------|

 

Keywords

OBJECT

*SHEET

SHEET

A specific sheet name can be entered otherwise the current context sheet is used.

SELECTED

Set this sheet to be the selected sheet.
Possible values are *YES or *NO.

DISPLAYGRID

Show grid.
Possible values are *YES or *NO.

PRINTGRID

Print grid.
Possible values are *YES or *NO.

PRINTAREA

Set print area.
Example value: $A$1:$B$2.

PRINTOFIT

Enable or disable print to fit.
Possible values are *YES or *NO.

PROTECT

Enable or disable sheet protection.
Possible values are *YES or *NO.

PASSWORD

The worksheet protection password is optional and is used in combination with the PROTECT keyword.

FREEZE

Create a split freeze pane.
Use the value of n,n to create a column split,row split freeze pane.
Use the value of n,n,n,n to create column split,row split,left most column, top row freeze pane.
Use the value of 0,0 to remove the split freeze pane.

MARGIN

Set sheet margins.
The value is top margin, bottom margin, left margin, right margin, header margin and footer margin component values comma separated.
An empty string value is used to allow a component value to be ignored.

HEADER

Specify which header content to change. The possible values are *LEFT,*RIGHT or *CENTER.

FOOTER

Specify which footer content to change. The possible values are *LEFT, *RIGHT or *CENTER.

CONTENT

The header or footer content text.
Special substitution values can be used within the header and footer text.
&D Date
&T Time
&P Page Number
&N Total Number of Pages
&B Bold
&U Underline
&I Italics
&S Strike Through
&E Double Underline
&X Superscript
&Y Subscript
&F Workbook Name
&AWorksheet Name
&"font name" Font Name
&nn Font Size (Must be a two digit number. 01 to 99)
&NL New Line