Retrieves the value of a cell in the current sheet.
The value is sent back to the AS/400 by the return message from the PC (&RESULT variable).
Syntax
CHGVAR VAR(&CMD)VALUE('XLGETVALUE')
CHGVAR VAR(&PARM1)VALUE('coordinates')
CHGVAR VAR(&PARM2)VALUE(' ')
CALL PGM(LNCCMD) PARM(&HANDLE &CMD &OPT +
&PARM1 &PARM2 &RESULT)
Parameters
Parameters |
|
Parm1 |
The coordinates can be given in the form: If the coordinates are not filled in, the active cell is taken into account.
|
RESULT |
The result passes through the return message from the PC (variable &RESULT).
|
Example
To retrieve the value of the cell named "Sum":
CHGVAR VAR(&CMD)VALUE('XLGETVALUE')
CHGVAR VAR(&PARM1)VALUE('Sum')
CHGVAR VAR(&PARM2) VALUE(' ')
CALL PGM(LNCCMD) PARM(&HANDLE &CMD &OPT +
&PARM1 &PARM2 &RESULT)
/ * TO PRINT THE RETURN VALUE ON THE SCREEN */
SNDPGMMSG MSGID(CPF9898) MSGF(QSYS/QCPFMSG) +
MSGDTA(&RESULT) TOPGMQ(*EXT) MSGTYPE(*STATUS)
To recover the value of cell C4:
LNCCMD CMD(XLGETVALUE) PARM1('C4')
See also