GET

LANSA Integrator

GET

The GET command is used to get information about the current open Excel document.

 

                                                         Required

 

 GET -------- OBJECT ----------- *SHEETS ----------------------->

                                 *NAMES

                                 *ROWCOUNT

                                 *COLUMNCOUNT

                                 *CELLCOUNT

                                 *CELL

 

                                                         Optional

 

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

 

          >-- ROW -------------- value ------------------------->

 

          >-- R1C1 ------------- value ------------------------->

 

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

 

          >-- SCALE ------------ value ------------------------->

 

          >-- NUMBERFORMAT ----- *NONE -------------------------|

                                 *DEFAULT

                                 *CLIENT

                                 *USERAGENT

 

 

Keywords

OBJECT

The type of object to return must be indicated as either *SHEETS, *NAMES, *ROWCOUNT, *COLUMNCOUNT, *CELLCOUNT or *CELL.

A value of *SHEETS returns a working list with all the sheet names in the current document.

A value of *NAMES returns a working list with all the defined names in the current document. If the working list has two fields then the second field receives the define name reference formula.

A value of *ROWCOUNT returns the number of rows in the worksheet specified by the SHEET keyword into the #JSMMSG field.

A value of *COLUMNOUNT returns the maximum number of columns in the worksheet specified by the SHEET keyword into the #JSMMSG field.

A value of *CELLCOUNT returns the number of cells in the worksheet specified by the SHEET keyword and the row specified by the ROW keyword into the #JSMMSG field.

A value of *CELL returns the cell value into the #JSMMSG response field. Refer to keywords R1C1, NAME, SCALE and NUMBERFORMAT.

SHEET

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

R1C1

Cell row and column. This keyword can be used instead of NAME.

NAME

Defined name. The defined name contains the cell location in standard Excel A1 reference style. For example. C10 or SheetName!C10.

SCALE

This optional keyword specifies the decimal scale that will be used on numeric cells that have a general number format. The default value is 4.

NUMBERFORMAT

This optional keyword handles numeric strings where the decimal separator is not the decimal point character ".".

Refer to NUMBERFORMAT for more information.

Examples

The following examples use the GET command to retrieve information about the current Excel document.

RDML

 

USE BUILTIN(JSM_COMMAND) WITH_ARGS('GET OBJECT(*SHEETS) SERVICE_LIST(SHEET)') TO_GET(#JSMSTS #JSMMSG #WRKLST)

 

RDMLX

 

use builtin(jsmx_command) with_args(#jsmhandle 'get object(*rowcount) sheet(parts)') to_get(#jsmsts #jsmmsg)