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

Assigns values to multiple cells on the same row from the active cell. 

 

Syntax

 

CHGVAR                VAR(&CMD)VALUE('XLSETLINE')

CHGVAR                VAR(&PARM1)VALUE('Values')

CHGVAR                VAR(&PARM2)VALUE('Properties')

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

                      &PARM1 &PARM2 &RESULT)

 

Parameters

 

Parameters

 

Parm1

 

 

 

 

 

 

 

 

Parm2

 

 

A string containing the values ​​to assign to cells.

The string can contain the following symbolic word:
%SEP%: To move to the next cell.
If we were positioned on the last column of the table, we go to the beginning of the next line.

 

Character string that can contain cell formats.
The formats of each cell are separated by the word: %SEP%.
Several formats can be applied to a cell. They are then separated by a semicolon.

The formats can be:

NUMFMT(d [DECPOINT=p] [GRPPOINT=g])

with :
-d is the number of decimals,
-p represents the character to use for the decimal point. (Point character by default),
-g is the character to use to separate groups of 3 digits.

PROP sets the value of a property for the contents of the corresponding cell.
Example:
PROP(Font.bold)=True; PROP(Font.italic)=True

 

 

 

 

Examples

 

The example below sends the values for 4 cells, and sets the blue color to the second cell, the value of which is sent in numeric format, with 2 decimals.

 

CHGVAR

VAR(&CMD) VALUE('XLSETLINE')

CHGVAR

VAR(&PARM1) VALUE(&NAME *CAT '%SEP%' *CAT +

&AMOUNT *CAT '%SEP%' *CAT &ADDRESS *CAT '%SEP%'+ *CAT &CITY)

CHGVAR

VAR(&PARM2) VALUE('%SEP%NUMFMT(2);PROP(Font.Color)= + INT(255) ')

CALL

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

 

The following example creates a new workbook and insert 2 rows from cell B2:

 

 LNCCMD     CMD(EXCELOPEN) PARM1('visible;new')             

                                                            

 LNCCMD     CMD(XLCELLS) PARM1('Ref="$B$2";select=true')    

                                                            

 LNCCMD     CMD(XLSETLINE) +                                

              PARM1('Aura%SEP%Equipements%SEP%2019') +      

              PARM2('%SEP%PROP(Font.Bold)=true;PROP(Font.+  

              Color)=INT(255)%SEP%PROP(Font.Color)=vbBlue') 

                                                            

 LNCCMD     CMD(XLINSERT) PARM1('After=true') 

             

 LNCCMD     CMD(XLSETLINE) +                                

              PARM1('Power8%SEP%IBM%SEP%2019') +            

              PARM2('%SEP%PROP(Font.Bold)=TRUE;PROP(Font.+  

              Color)=INT(255)%SEP%PROP(Font.Color)=vbBlue') 

 

 

Note

 

To use the Font.Color property, it is necessary to use Windows color codes.

Color constants:

 

Constants values:

 

 

PROP(Font.Color)=vbMagenta

PROP(Font.Color)=INT(255) //red

 

You can also use BGR code with the RGB function:

 

PROP(Font.Color)=RGB(255,0,0) //blue

PROP(Font.Color)=RGB(0,255,0) // green

PROP(Font.Color)=RGB(0,0,255) // red

Example :

 

LNCCMD CMD(XLGOTOCELL) PARM1('$D$5')

 

LNCCMD CMD(XLSETLINE) PARM1('A%SEP%B%SEP%C') +

PARM2('PROP(Font.Color)=RGB(0,255,0);PROP(Font.Bold)=True+

%SEP%PROP(Font.Color)=RGB(255,0,0)%SEP%PROP(Font.Color)=RGB(0,0,255)')                                                               

 

 

image