${macroExp}

Read(4381) Label: macro replacement,

Description:

This is used to complete the macro replacement operation.

Syntax:

${macroExp}

Note:

The macro here is taken as an expression to be computed, the result must be a string, which will replace the ${macroExp}.

 

The macro enclosed in quotation marks or populated in the constant cell will not be replaced.

Parameter:

macroExp

The macro expression

Return value:

String

Example:

 

A

 

1

="1"

 

2

=${A1}+3

After replacing, the expression becomes =1+3 and the return value is 4.

3

="${A1}+3"

Macro is enclosed in quotation marks, so it will not be replaced, and the return value is still "${A1}+3".

4

=demo.query("select * from EMPLOYEE limit 5")

 

 

5

=A4.(age(~.HIREDATE))

Find ages of the first 5 employees.

 

 

6

=A4.(${age(A4.~.HIREDATE)}+5)

Characters in a macro will be replaced only when the expression is first parsed; a macro can’t be parsed repeatedly.