This command inserts or deletes rows and columns, to give a new size to an area of an Excel sheet.
Syntax
CHGVAR |
VAR(&CMD) VALUE('XLRESIZE') |
CHGVAR |
VAR(&PARM1)
VALUE(' [;Rowcnt=number] [;Colcnt=number] [;Name="Nouveau nom de zone"] ') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT) |
Parameters
Parameters |
|
Parm1 |
1) Either we specify the name of the zone. 2)
Either we specify the reference of the cell at the top left of the area to
resize. RowCnt, ColCnt: Rowcnt and Colcnt are used to specify the cell reference at the bottom right of the area to be resized, if the reference of the cell in the top left of the area to be resized has been specified with the Ref parameter. In this case, Rowcnt and Colcnt respectively represent the number of rows and columns selected, from the reference given by Ref. RowCount: Number
of rows in the resized zone. ColCount: Number
of columns in the resized zone. EntireRow : True to insert or delete whole lines, or False to move cells up or down the width of the selection. EntireColumn : True to insert or delete entire columns, or False (default) to shift cells to the left or right over the height of the selection. Fill : True
to copy the selection to all new inserted cells. Clear : True clears all cells that do not contain formulas in the new zone. Name allows you to assign a name to the resized area. If Ref refers to a named zone, the same name can be given to Name.
|
Examples
The
following example resizes the area named "Orders" to 10 lines.
The number of columns in the zone does not change.
Entire lines are deleted or added.
CHGVAR |
VAR(&CMD) VALUE('XLRESIZE') |
CHGVAR |
VAR(&PARM1) VALUE('Ref="Orders";RowCount=10;EntireRow=True') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT) |
The
area named "Orders" is resized to 10 lines.
The formulas are copied to the new lines.
Cells not containing formulas are erased.
Insertions or deletions are done only over the width of the area.
CHGVAR |
VAR(&CMD) VALUE('XLRESIZE') |
CHGVAR |
VAR(&PARM1)
+ |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT) |
The following area :
is resized with 10 lines, and named "Data":
LNCCMD CMD(XLRESIZE) + PARM1('Ref="$A$1";RowCount=10;name="Data";Fill=false;Rowcnt=3;Colcnt=3')
See also
• XLCELLS