AllowFormula
Specifies whether to treat values starting with an equals (=) sign as formulas during inserts and updates.
Data Type
bool
Default Value
true
Remarks
When this connection property is set to True, values starting with an equals sign (=) are treated as formulas when executing INSERT and UPDATE queries. The specified formula is embedded into the affected cell(s) and the result of the formula is returned in query results.
When this connection property is set to False, values starting with an equals sign (=) are treated as literal strings when executing INSERT and UPDATE queries.
To illustrate this, suppose you have the following sheet ...
| ColA | ColB |
| 1 | 5 |
| 4 | 6 |
INSERT INTO Sheet1 (ColA,ColB) VALUES ("=SUM(A2:A3)","8"),
If this connection property is set to True, the sheet now contains:
| ColA | ColB |
| 1 | 5 |
| 4 | 6 |
| 5 (result of this cell's now-embedded formula: =SUM(A2:A3) ) | 8 |
| ColA | ColB |
| 1 | 5 |
| 4 | 6 |
| =SUM(A2:A3) (literal string) | 8 |