ADD

LANSA Integrator

ADD

The ADD command is used to add sheets, cell styles, named areas, images, formulas, hyperlinks, comments and cell merges to an Excel document.

To add a sheet, use the OBJECT keyword with a value of *SHEET.

 

                                                         Required

 

 ADD -------- OBJECT ----------- *SHEET ------------------------>

 

          >-- SHEET ------------ value -------------------------|

 

Keywords

OBJECT

*SHEET

SHEET

A new sheet name.

 

To add a comment, use the OBJECT keyword with a value of *COMMENT.

 

                                                         Required

 

 ADD -------- OBJECT ----------- *COMMENT ---------------------->

 

          >-- R1C1 ------------- n,n ---------------------------|

 

                                                         Optional

 

          >-- SHEET ------------ value ------------------------->

 

          >-- AREA ------------- n,n --------------------------->

 

          >-- COMMENT ---------- value -------------------------|

 

Keywords

OBJECT

*COMMENT

SHEET

A specific sheet name can be entered otherwise the current context sheet is used.

R1C1

Cell row and column.

AREA

Display rectangle.
Default value is 2,4.

COMMENT

The comment text. If the comment keyword is not used, then the cell comment is removed.

 

To merge cells, use the OBJECT keyword with a value of *CELLMERGE.

 

                                                         Required

 

 ADD -------- OBJECT ----------- *CELLMERGE -------------------->

 

          >-- R1C1 ------------- n,n ---------------------------|

 

          >-- R2C2 ------------- n,n ---------------------------|

 

                                                         Optional

 

          >-- SHEET ------------ value ------------------------->

 

Keywords

OBJECT

*CELLMERGE

SHEET

A specific sheet name can be entered otherwise the current context sheet is used.

R1C1

Cell row and column.

R2C2

Cell row and column.

 

To add an image, use the OBJECT keyword with a value of *IMAGE.

 

                                                         Required

 

 ADD -------- OBJECT ----------- *IMAGE ------------------------>

 

          >-- FILE ------------- value ------------------------->

 

          >-- R1C1 ------------- n,n --------------------------->

 

                                                         Optional

 

          >-- SHEET ------------ value ------------------------->

 

          >-- RESIZE ----------- n ----------------------------->

 

          >-- ANCHOR ----------- *MOVE -------------------------|

                                 *MOVESIZE

                                 *NOMOVESIZE

 

Keywords

OBJECT

*IMAGE

SHEET

A specific sheet name can be entered otherwise the current context sheet is used.

FILE

The path to the PNG or JPEG image file.

R1C1

Cell row and column.

RESIZE

This keyword is optional and specifies image resize amount.
The default value is 1.0.

ANCHOR

This keywords specifies how the image moves and sizes when column is sized. The default value is *MOVESIZE.

 

To add a formula, use the OBJECT keyword with a value of *FORUMLA.

 

                                                         Required

 

 ADD -------- OBJECT ----------- *FORMULA ---------------------->

 

          >-- FORMULA ---------- value ------------------------->

 

          >-- R1C1 ------------- n,n --------------------------->

 

                                                         Optional

 

          >-- SHEET ------------ value -------------------------|

 

Keywords

OBJECT

*FORUMLA

SHEET

A specific sheet name can be entered otherwise the current context sheet is used.

FORMULA

Excel formula.

R1C1

Cell row and column.

 

To add a hyperlink use the OBJECT keyword with a value of *HYPERLINK.

 

                                                         Required

 

 ADD -------- OBJECT ----------- *HYPERLINK -------------------->

 

          >-- ADDRESS ---------- value ------------------------->

 

          >-- R1C1 ------------- n,n --------------------------->

 

                                                         Optional

 

          >-- SHEET ------------ value ------------------------->

 

          >-- TYPE ------------- *URL -------------------------->

                                 *FILE

                                 *EMAIL

                                 *DOCUMENT

 

          >-- LABEL ------------ value -------------------------|

 

Keywords

OBJECT

*HYPERLINK

SHEET

A specific sheet name can be entered otherwise the current context sheet is used.

ADDRESS

Hyperlink address.

R1C1

Cell row and column.

TYPE

Type of hyperlink.

LABEL

Hyperlink label.

 

To add a name to the workbook use the OBJECT keyword with a value of *NAME.

 

                                                         Required

 

 ADD -------- OBJECT ----------- *NAME ------------------------->

 

          >-- NAME ------------- value ------------------------->

 

          >-- REFERENCE -------- value ------------------------->

 

                                                         Optional

 

          >-- SHEET ------------ value ------------------------->

 

          >-- COMMENT ---------- value -------------------------|

 

Keywords

OBJECT

*NAME

NAME

Name

REFERENCE

Forumla Reference.
Example: A1:C5
Example: Sheet1!A1:C5
Example: SUM(Sheet1!I$2:I$6)

SHEET

Sheet name to prefix reference, if sheet name not included in reference.
Example: Sheet1

COMMENT

Comment

 

To add a cell style, use the OBJECT keyword with a value of *CELLSTYLE.

 

                                                         Required

 

 ADD ------------- OBJECT ---------- *CELLSTYLE ---------------->

 

               >-- SHEET ----------- value --------------------->

 

               >-- COLUMN ---------- n ------------------------->

                                     n,n 

 

                                                         Optional

 

               >-- RANGE ----------- n,n ----------------------->

 

               >-- TYPE ------------ *NUMBER ------------------->

                                     *DATE 

                                     *BOOLEAN

                                     *STRING

                                     *BLANK

 

               >-- FORMAT----------- value --------------------->

                                     *FORMAT0

                                     *FORMAT1

                                     *FORMAT2

                                     *FORMAT3

                                     *FORMAT4

                                     *FORMAT5

                                     *FORMAT6

                                     *FORMAT7

                                     *FORMAT8

                                     *FORMAT9

                                     *FORMAT10

                                     *FORMAT11

                                     *FORMAT12

                                     *FORMAT13

                                     *FORMAT14

                                     *FORMAT15

                                     *FORMAT16

                                     *FORMAT17

                                     *FORMAT18

                                     *FORMAT19

                                     *FORMAT20

                                     *FORMAT21

                                     *FORMAT22

                                     *FORMAT37

                                     *FORMAT38

                                     *FORMAT39

                                     *FORMAT40

                                     *FORMAT41

                                     *FORMAT42

                                     *FORMAT43

                                     *FORMAT44

                                     *FORMAT45

                                     *FORMAT46

                                     *FORMAT47

                                     *FORMAT48

                                     *FORMAT49

 

               >-- FONT ------------ value --------------------->

                                     *ARIAL

                                     *CALIBRI

                                     *COURIER

                                     *COURIERNEW

                                     *TAHOMA

                                     *TIMES

 

               >-- FONTSIZE --------- value -------------------->

 

               >-- FONTCOLOR ------- *AQUA --------------------->

                                     *AUTOMATIC

                                     *BLACK

                                     *BLUE

                                     *BLUEGREY

                                     *BRIGHTGREEN

                                     *BROWN

                                     *CORAL

                                     *CORNFLOWERBLUE

                                     *DARKBLUE

                                     *DARKGREEN

                                     *DARKRED

                                     *DARKTEAL

                                     *DARKYELLOW

                                     *GOLD

                                     *GREEN

                                     *GREY25

                                     *GREY40

                                     *GREY50

                                     *GREY80

                                     *INDIGO

                                     *LAVENDAR

                                     *LEMONCHIFFON

                                     *LIGHTBLUE

                                     *LIGHTCORNFLOWERBLUE

                                     *LIGHTGREEN

                                     *LIGHTORANGE

                                     *LIGHTTURQUOISE

                                     *LIGHTYELLOW

                                     *LIME

                                     *MAROON

                                     *OLIVEGREEN

                                     *ORANGE

                                     *ORCHID

                                     *PALEBLUE

                                     *PINK

                                     *PLUM

                                     *RED

                                     *ROSE

                                     *SEAGREEN

                                     *SKYBLUE

                                     *TAN

                                     *TEAL

                                     *TURQUOISE

                                     *VIOLET

                                     *WHITE

                                     *YELLOW

 

               >-- BOLD ------------ *YES ---------------------->

                                     *NO

 

               >-- ITALIC ---------- *YES ---------------------->

                                     *NO

 

               >-- BORDER ---------- *ALL ---------------------->

                                     *NONE

                                     *TOP

                                     *BOTTOM

                                     *LEFT

                                     *RIGHT

 

               >-- BORDERSTYLE ----- *NONE --------------------->

                                     *MEDIUM

                                     *THICK

                                     *THIN

                                     *HAIR

                                     *DOUBLE

 

               >-- BORDERCOLOR ----- *AQUA --------------------->

                                     *AUTOMATIC

                                     *BLACK

                                     *BLUE

                                     *BLUEGREY

                                     *BRIGHTGREEN

                                     *BROWN

                                     *CORAL

                                     *CORNFLOWERBLUE

                                     *DARKBLUE

                                     *DARKGREEN

                                     *DARKRED

                                     *DARKTEAL

                                     *DARKYELLOW

                                     *GOLD

                                     *GREEN

                                     *GREY25

                                     *GREY40

                                     *GREY50

                                     *GREY80

                                     *INDIGO

                                     *LAVENDAR

                                     *LEMONCHIFFON

                                     *LIGHTBLUE

                                     *LIGHTCORNFLOWERBLUE

                                     *LIGHTGREEN

                                     *LIGHTORANGE

                                     *LIGHTTURQUOISE

                                     *LIGHTYELLOW

                                     *LIME

                                     *MAROON

                                     *OLIVEGREEN

                                     *ORANGE

                                     *ORCHID

                                     *PALEBLUE

                                     *PINK

                                     *PLUM

                                     *RED

                                     *ROSE

                                     *SEAGREEN

                                     *SKYBLUE

                                     *TAN

                                     *TEAL

                                     *TURQUOISE

                                     *VIOLET

                                     *WHITE

                                     *YELLOW

 

               >-- BACKGROUND ------ *AQUA --------------------->

                                     *AUTOMATIC

                                     *BLACK

                                     *BLUE

                                     *BLUEGREY

                                     *BRIGHTGREEN

                                     *BROWN

                                     *CORAL

                                     *CORNFLOWERBLUE

                                     *DARKBLUE

                                     *DARKGREEN

                                     *DARKRED

                                     *DARKTEAL

                                     *DARKYELLOW

                                     *GOLD

                                     *GREEN

                                     *GREY25

                                     *GREY40

                                     *GREY50

                                     *GREY80

                                     *INDIGO

                                     *LAVENDAR

                                     *LEMONCHIFFON

                                     *LIGHTBLUE

                                     *LIGHTCORNFLOWERBLUE

                                     *LIGHTGREEN

                                     *LIGHTORANGE

                                     *LIGHTTURQUOISE

                                     *LIGHTYELLOW

                                     *LIME

                                     *MAROON

                                     *OLIVEGREEN

                                     *ORANGE

                                     *ORCHID

                                     *PALEBLUE

                                     *PINK

                                     *PLUM

                                     *RED

                                     *ROSE

                                     *SEAGREEN

                                     *SKYBLUE

                                     *TAN

                                     *TEAL

                                     *TURQUOISE

                                     *VIOLET

                                     *WHITE

                                     *YELLOW

 

               >-- WRAP ------------ *YES ---------------------->

                                     *NO

 

               >-- LOCKED ---------- *YES ---------------------->

                                     *NO

 

               >-- INDENT ---------- value --------------------->

 

               >-- HALIGN ---------- *CENTRE ------------------->

                                     *CENTER

                                     *FILL

                                     *GENERAL

                                     *JUSTIFY

                                     *LEFT

                                     *RIGHT

 

               >-- VALIGN ---------- *CENTRE -------------------|

                                     *CENTER

                                     *JUSTIFY

                                     *TOP

                                     *BOTTOM

 

Keywords

OBJECT

*CELLSTYLE

SHEET

Sheet name associated with the cell style.

COLUMN

This keyword is used to specify the column number or range of column numbers you wish your cell style to act on. You can specify a single column number or a comma-separated range.

The format of this keyword is as follows:

COLUMN(column), for example, COLUMN(3).

COLUMN(start column, end column), for example, COLUMN(3,5).

This keyword is mandatory.

RANGE

This keyword is used to define the range of rows within the specified column on which this cell style will act.

If left blank, then the entire column will be acted upon.

The format of this keyword is as follows:

RANGE(start row, end row), for example, RANGE(3,5).

This keyword is optional.

TYPE

This keyword is used to define the column type.

The possible values are:

*NUMBER

*DATE

*BOOLEAN

*STRING

*BLANK

The default value is *NUMBER

This keyword is optional.

FORMAT

Excel format to be applied to the cell value.

The default format depends on the cell type. If the cell type is *DATE the default format is the builtin format *FORMAT14 which is an internationalised date format. The default format for all other cell types is the builtin format *FORMAT0 which is the General format.

*FORMAT0  General
*FORMAT1  0
*FORMAT2  0.00
*FORMAT3  #,##0
*FORMAT4  #,##0.00
*FORMAT5  "$"#,##0_);("$"#,##0)
*FORMAT6  "$"#,##0_);[Red]("$"#,##0)
*FORMAT7  "$"#,##0.00_);("$"#,##0.00)
*FORMAT8  "$"#,##0.00_);[Red]("$"#,##0.00)
*FORMAT9  0%
*FORMAT10 0.00%
*FORMAT11 0.00E+00
*FORMAT12 # ?/?
*FORMAT13 # ??/??
*FORMAT14 m/d/yy
*FORMAT15 d-mmm-yy
*FORMAT16 d-mmm
*FORMAT17 mmm-yy
*FORMAT18 h:mm AM/PM
*FORMAT19 h:mm:ss AM/PM
*FORMAT20 h:mm
*FORMAT21 h:mm:ss
*FORMAT22 m/d/yy h:mm
*FORMAT37 #,##0_);(#,##0)
*FORMAT38 #,##0_);[Red](#,##0)
*FORMAT39 #,##0.00_);(#,##0.00)
*FORMAT40 #,##0.00_);[Red](#,##0.00)
*FORMAT41 _("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)
*FORMAT42 _(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)
*FORMAT43 _("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)
*FORMAT44 _(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)
*FORMAT45 mm:ss
*FORMAT46 [h]:mm:ss
*FORMAT47 mm:ss.0
*FORMAT48 ##0.0E+0
*FORMAT49 @

FONT

Font is any valid Windows font name.

The special values of *ARIAL, *CALIBRI, *COURIER, *COURIERNEW, *TAHOMA, *TIMES are substituted to their standard Windows font names.

FONTSIZE

The keyword is used to define the font size.

The default point size is 11.

This keyword is optional.

FONTCOLOR

The keyword is used to define the font color.

BOLD

This keyword is used to set the font to bold or not.

The possible values for this keyword are:

*NO

*YES

The default value is *NO

This keyword is optional.

ITALIC

This keyword is used to set the font to italics or not.

The possible values for this keyword are:

*NO

*YES

The default value is *NO

This keyword is optional.

BORDER

This keyword is used to define the lines of the border.

The possible values are as follows:

*ALL

*NONE

*TOP

*BOTTOM

*LEFT

*RIGHT

There is no default value.

BORDERSTYLE

This keyword is used to define the borderstyle.

The BORDER keyword needs to be specified in conjunction with this keyword.

Possible values for this keyword are as follows:

*NONE

*MEDIUM

*THICK

*THIN

*HAIR

*DOUBLE

The default value is *THIN

This keyword is optional.

BORDERCOLOR

This keyword is used to define the border color.

The BORDER keyword needs to be specified in conjunction with this keyword.

BACKGROUND

This keyword is used to define the background color.

There is no default value.

WRAP

This keyword is used to enable text wrap.

The possible values for this keyword are:

*NO

*YES

The default value is *NO

This keyword is optional.

LOCKED

This keyword is used to enable locked.

The possible values for this keyword are:

*NO

*YES

The default value is *NO

This keyword is optional.

INDENT

This keyword is used to specify the cell value indent.

The default value is 0.

This keyword is optional.

HALIGN

This keyword is used to define the horizontal alignment.

The possible values for this keyword are as follows:

*CENTRE

*CENTER

*FILL

*GENERAL

*JUSTIFY

*LEFT

*RIGHT

There is no default value.

This keyword is optional.

VALIGN

This keyword is used to define the vertical alignment.

The possible values for this keyword are as follows:

*CENTRE

*CENTER

*JUSTIFY

*TOP

*BOTTOM

There is no default value.

This keyword is optional.