PreviousNext
Help > Programming with LAUNCHER Office > LNCCMD commands > Commands list > XLGETVALUE command
XLGETVALUE command

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 of the cell whose value we want to recover.

The coordinates can be given in the form:
- Syntax $B$3. Example: $B 3 is column B, row 3.
- Syntax CL. C to designate the column and L to designate the row. Example: B3 designates row 3, and column 2 (B).
- Symbolic name given to a cell or group of cells.

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

XLSETTEXT

XLSETVALUE