The SET command is used to change the current context sheet, sheet column widths, and sheet settings of the specified sheet. The type of change is specified by the OBJECT keyword's value.
Command | Keyword | Value | Developer notes |
|---|---|---|---|
SET | OBJECT | *CONTEXT | |
SHEET | value | Required. Sheet name that must exist in the document. |
SET OBJECT(*CONTEXT) SHEET(Sales)
Command | Keyword | Value | Developer notes |
|---|---|---|---|
SET | OBJECT | *ROWHEIGHT | |
SHEET | value | Optional. A specific sheet name can be entered otherwise the current context sheet is used. | |
HEIGHT | integer | Optional. Height of row in twips. | |
RANGE | n | Range of columns. A single column number or two comma separated column numbers to specify a range of columns |
SET OBJECT(*ROWHEIGHT) HEIGHT(300) RANGE(10)
SET OBJECT(*ROWHEIGHT) HEIGHT(300) RANGE(12,20)
Command | Keyword | Value | Developer notes |
|---|---|---|---|
SET | OBJECT | *COLUMNWIDTH | |
SHEET | value | Optional. A specific sheet name can be entered otherwise the current context sheet is used. | |
WIDTH | integer | Width of column. | |
RANGE | n | Range of columns. A single column number or two comma separated column numbers to specify a range of columns. |
SET OBJECT(*COLUMNWIDTH) WIDTH(2560) RANGE(10)
SET OBJECT(*COLUMNWIDTH) WIDTH(2560) RANGE(12,20)
Command | Keyword | Value | Developer notes |
|---|---|---|---|
SET | OBJECT | *HIDEROW | |
SHEET | value | Optional. A specific sheet name can be entered otherwise the current context sheet is used. | |
RANGE | n | Range of rows. A single row number or two comma separated row numbers to specify a range of rows. |
SET OBJECT(*HIDEROW) RANGE(10)
SET OBJECT(*HIDEROW) RANGE(20,25) SHEET(Sales)
Command | Keyword | Value | Developer notes |
|---|---|---|---|
SET | OBJECT | *HIDECOLUMN | |
SHEET | value | Optional. A specific sheet name can be entered otherwise the current context sheet is used. | |
RANGE | n | Range of columns. A single column number or two comma separated numbers to specify a range of columns. |
SET OBJECT(*HIDECOLUMN) RANGE(10)
SET OBJECT(*HIDECOLUMN) RANGE(4,4) SHEET(Sales)
Command | Keyword | Value | Developer notes |
SET | OBJECT | *SHEET | All keywords are optional. |
SHEET | value | Optional. A specific sheet name can be entered otherwise the current context sheet is used. | |
ROWHEIGHT | integer | Optional. Set the default row height in twips. | |
COLUMNWIDTH | integer | Optional. Set the default column width in characters. | |
SELECTED | *YES | Optional. Set this sheet to be the selected sheet. | |
*NO | |||
DISPLAYGRID | *YES | Optional. Show grid. | |
*NO | |||
PRINTGRID | *YES | Optional. Print grid. | |
*NO | |||
PRINTAREA | value | Optional. Set print area. | |
PRINTOFIT | *YES | Optional. Enable or disable print to fit. | |
*NO | |||
PROTECT | *YES | Optional. Enable or disable sheet protection. | |
*NO | |||
PASSWORD | value | Optional. The worksheet protection password is optional and is used in combination with the PROTECT keyword. | |
FREEZE | value | Optional. Create a split freeze pane. | |
MARGIN | value | Optional. Set sheet margins. | |
HEADER | *LEFT | Optional. Specify which header content to change using one of the possible values. | |
*RIGHT | |||
*CENTER | |||
FOOTER | *LEFT | Optional. Specify which footer content to change using one of the possible values. | |
*RIGHT | |||
*CENTER | |||
CONTENT | value | The header or footer content text. |
SET OBJECT(*SHEET) PRINTAREA($E$5:$F$9)
SET OBJECT(*SHEET) ROWHEIGHT(800) COLUMNWIDTH(80)
SET OBJECT(*SHEET) HEADER(*RIGHT) CONTENT(&P+1 of &N)
SET OBJECT(*SHEET) HEADER(*LEFT) CONTENT(Hello at &D &T from&NL the excel service)
SET OBJECT(*SHEET) FOOTER(*RIGHT) CONTENT(&"Courier New"&12A message)