Skip to content

Commit 026f699

Browse files
committed
Minor documentation updates
1 parent ca90379 commit 026f699

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/topics/calculation-engine.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ with PhpSpreadsheet, it evaluates to the value "64":
2222

2323
![09-command-line-calculation.png](./images/09-command-line-calculation.png)
2424

25+
When writing a formula to a cell, formulae should always be set as they would appear in an English version of Microsoft Office Excel, and PhpSpreadsheet handles all formulae internally in this format. This means that the following rules hold:
26+
27+
- Decimal separator is `.` (period)
28+
- Function argument separator is `,` (comma)
29+
- Matrix row separator is `;` (semicolon)
30+
- English function names must be used
31+
2532
Another nice feature of PhpSpreadsheet's formula parser, is that it can
2633
automatically adjust a formula when inserting/removing rows/columns.
2734
Here's an example:
@@ -43,6 +50,11 @@ inserted 2 new rows), changed to "SUM(E4:E11)". Also, the inserted cells
4350
duplicate style information of the previous cell, just like Excel's
4451
behaviour. Note that you can both insert rows and columns.
4552

53+
If you want to "anchor" a specific cell for a formula, then you prefix the column and/or the row with a `$` symbol, exactly as you would in MS Excel itself.
54+
So if a formula contains "SUM(E$4:E9)", and you insert 2 new rows after row 1, the formula will be adjusted to read "SUM(E$4:E11)", with the `$` fixing row 4 as the start of the range.
55+
56+
57+
4658
## Calculation Cache
4759

4860
Once the Calculation engine has evaluated the formula in a cell, the result

0 commit comments

Comments
 (0)