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

Writes a formula to a cell in an Excel workbook. 

 

Syntax

 

CHGVAR

VAR(&CMD) VALUE('XLFORMULA')

CHGVAR

VAR(&PARM1) VALUE('[cell coordinates]')

CHGVAR

VAR(&PARM2) VALUE('formula')

CALL

PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +

&PARM2 &RESULT)

 

Parameters

 

Parameters

 

Parm1


Coordinates of the cell to modify.
Optional. If Parm1 is not specified, the active cell will be taken into account.

The coordinates of the cell can be given as following:
- Syntax $B$3. Example: $B$3 is column B, line 3.
- Syntax CL. C to designate the column and L to designate the line. Example: B3 designates line 3, and column 2 (B).
- Symbolic name given to a cell.

Parm2

Formula to execute.

 

 

Example

 

CHGVAR

VAR(&CMD) VALUE('XLFORMULA')

CHGVAR

VAR(&PARM1) VALUE($A$2)

CHGVAR

VAR(&PARM2) VALUE ('=B8+E10')

CALL

PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +

&PARM2 &RESULT)

 

or

CHGVAR

VAR(&CMD) VALUE('XLFORMULA')

CHGVAR

VAR(&PARM1) VALUE('A2')

CHGVAR

VAR(&PARM2) VALUE ('=B8+E10')

CALL

PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +

&PARM2 &RESULT)