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

Assigns values to cells of a Word table.

 

Syntax

 

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

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

CHGVAR                VAR(&PARM1)VALUE('Formats of cells')

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

                      &PARM1 &PARM2 &RESULT)

MONMSG                MSGID(LNC0000) EXEC(GOTO CMDLBL(ERROR))

 

Parameters

Parameters

 

Parm1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Parm2

 


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

The values
​​of each cell are separated by the word : %SEP%.


The string can contain the following symbolic words:
%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.
%INS%: To insert a new line, and move to the beginning of the new line.
%MRG%: To merge the current cell with the next one.


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

 

 

 

Example

 

CHGVAR

VAR(&CMD) VALUE('WSETLINE')

CHGVAR

VAR(&PARM1) VALUE('%INS%Valeur colonne 1%SEP%Valeur Colonne 2 & 3%MRG%%SEP%12300%SEP%')

CHGVAR

VAR(&PARM2) VALUE('%SEP%PROP(Font.Italic)=True;PROP(Par+

agraphs.Item(1).Alignment)=wdAlignParagraph+

Right%SEP%NUMFMT(2)')

 

 

 

In this example, PARM1 contains values.

%INS% inserts a new line.

« Column 1 value » is assigned to first cell.

« Columns 2 & 3 values » is assigned to 2nd cell.

Cells #2 and #3 are merged with %MRG%.

« 123,00 » is assigned to 4th cell.

Last %SEP% moves current position to the next cell.
If the table contains only 4 columns, current position is moved to next line beginning.

 

PARM2 contains formats :

PARM2 begins with %SEP%, so, 1st cell has no particular format.

2nd cell (merged with 3rd cell) will be italics, right aligned.

4th cell is digital with two decimals.

 

See also

Special values