Copy the current selection or the contents of a cell to the clipboard or to a specified cell.
Syntax
CHGVAR |
VAR(&CMD) VALUE('XLCOPY') |
CHGVAR |
VAR(&PARM1)
VALUE(' ') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT) |
Parameters
Parameters |
|
Parm1 |
From :
Indicates cells coordinates from which content must be copied.
To :
Indicates cells coordinates to copy to. |
|
Notes
1)
The cells can be in the current sheet or in another sheet of the workbook.
The name of the sheet and the coordinates of the cell will then be separated by
a question mark.
Example: dest?F3 for cell F3 of the sheet named "dest".
2)
The name of the sheet must be enclosed in quotation marks if it contains
spaces.
Example: "dest leaf"?A1 for cell A1 of the sheet named "dest leaf".
Examples
This
example copies "Revenus" content to "$B$22" location.
CHGVAR |
VAR(&CMD) VALUE('XLCOPY) |
CHGVAR |
VAR(&PARM1) VALUE('From="Revenus";To="$B$2"') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT)) |
MONMSG |
MSGID(LNC0000) EXEC(GOTO CMDLBL(ERROR)) |
The
following example copies current selection to clipboard.
CHGVAR |
VAR(&CMD) VALUE('XLCOPY) |
CHGVAR |
VAR(&PARM1) VALUE(' ') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT)) |
MONMSG |
MSGID(LNC0000) EXEC(GOTO CMDLBL(ERROR)) |
Copy
of the contents of A1:B2 of the sheet "gold leaf" in the sheet
"dest".
The cell at the top left of the receiving area is cell F3.
LNCCMD CMD(XLCOPY) PARM1('From=""gold leaf"?A1:B2";To="dest?F3"')
See also
• XLPASTE