Commit 53bce34
committed
Add Ability to Add Custom Functions to Calculation
For an overview of why this is desired (and ways that people have coped with its absence), see issue PHPOffice#2900 and issue PHPOffice#4048; also PR PHPOffice#4043 which will be superseded by this PR.
The list of Excel functions is moved from Calculation/Calculation to its own member. I believe that it is done in a way that will not cause big complications to two experiments from @MarkBaker (PR PHPOffice#2714 and PR PHPOffice#2734). I believe it is also done in such a way that further refactoring of Calculation can follow this model.
Custom functions can be added or removed from the function list. You cannot add a function if it already exists in the list, and you cannot remove a non-custom function from the list. They will, of course, not be understood by Excel if written to a spreadsheet; the use case is mainly using the Calculation engine outside of spreadsheet context.1 parent 875dc35 commit 53bce34
File tree
6 files changed
+2791
-2676
lines changed- src/PhpSpreadsheet/Calculation
- tests/PhpSpreadsheetTests/Calculation
6 files changed
+2791
-2676
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments