AddInExpression

concerns

The AddInExpression attribute function adds an expression to the variable that affects a specific field in the excel sheet.

 

Syntax

AddInExpression(Expression As String, ExcelMapping As String)

Return value

None

Parameter

Use

Name

Type

Passing

Description

Required

Expression

String

ByVal

Expression

Required

ExcelMapping

String

ByVal

Excel cell or range description

Note

Input expressions can also be lists. Then the values of the list with ascending row number are written to the sheet from the specified Excel cell or range description.

 

Scalar variable and single cell

Color               Sheet1!A1

The value of the color variable is written in A1

 

Scalar variable and vertical range of cells

Color               Sheet!A1:A10

Color is duplicated written to cells A1-A10

 

Allocation expression and vertical range of cells

Expression (“=A1 * $B$1“)        Sheet!A1:A10

Cells A1-A10 contain =A1 * $B$1, A2 * $B$1, A3 * $B$1 etc.

 

List and single cell

Color()             Sheet1!A1

All values of Color are written in A1, A2, A3 etc.

 

List and vertical range of cells

Color()             Sheet1!A1:A4

The values of color are written in A1, A2, A3, A4. Excess indexes are not processed.

 

List and horizontal range of cells

Color()             Sheet1!A1:D1

The values of color are written in A1-D1. Excess indexes are not processed.

 

 

 

Example

 

Sheet.AddInExpression("TV.Stand", "Sheet1!B1")

# the value of the variable TV.Stand is written in B1 of Sheet1