I. Operator
Operators are used to perform program code operations and will perform operations on more than one operand item
Operator | Description | Operation object | Example |
---|---|---|---|
+ | Plus | Number or cell | 2+3 |
- | Minus | Number or cell | A1-B1 |
* | Multiplication | Number or cell | A1*2 |
/ | Division | Number or cell | A3/3 |
% | Take the remainder | Number or cell | 5% 2 is 1 |
&& | Condition and, only when the values of both operands are true, the value is true | Condition | A&&B |
|| | Condition or, as long as one of the two operands is true, the value is true | Condition | A||B |
& | Take the row and column of the cell | Cell | &A1 |
! | Negation is the opposite of the condition | Condition | !A, if A is true, !A is false |
== | equal | Number or variable | A==2 |
!= | not equal to | Number or variable | A!=null |
: | To, used to take a continuous range of cells | cell | For example, A1:B3 is the set of cells from A1 to B3 |
> | more than | Number or variable or cell | 3>2 |
< | less than | Number or variable or cell | A1<2 |
>= | more than or equal to | Number or variable or cell | A1>=2 |
<= | Less than or equal to | Number or variable or cell | A1<=2 |
. | Reference object or method | Object or method | ds1.select(#1) |
$ | Parameter reference character or absolute positioning | Parameter or absolute positioning | The former is like $para and the latter is used in hierarchical coordinates like B1=$B1 |
# | Column number | column | ds1.select(#1) |
${} | Macro definition | parameter | For example, in SQL select * from table ${"where 1=2"}, the value in ${} will be calculated first, and then the complete SQL statement will be spliced |
Cell[] | Hierarchical coordinate operator | cell | A2[A1:-1] |
$$$ | Indicates that the value of the current cell is the current value | Cells with data | if($$$=0,"",$$$) means that if the current value is 0, it will display empty, otherwise it will be the current value |
\\ | Quote "\", the value is \ | cell | Such as \"represents reference" |
\n | Newline | string | For example, if the string is aabb, if you want bb to be displayed in a new line, fill in aa\nbb |