Skip to content

Commit a3130ef

Browse files
author
MarkBaker
committed
Flag functions as spillage functions. We may be able to use this to determine whether a calculated value should automatically spill, and so know if we needed to set the arrayFormulaRange automatically as Excel itself does. The next step after that would be handling #SPILL! errors
1 parent adb0c13 commit a3130ef

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/PhpSpreadsheet/Calculation/Calculation.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,7 @@ class Calculation
10431043
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
10441044
'functionCall' => [LookupRef\Filter::class, 'filter'],
10451045
'argumentCount' => '2-3',
1046+
'spillageFunction' => true,
10461047
],
10471048
'FILTERXML' => [
10481049
'category' => Category::CATEGORY_WEB,
@@ -2083,6 +2084,7 @@ class Calculation
20832084
'category' => Category::CATEGORY_MATH_AND_TRIG,
20842085
'functionCall' => [MathTrig\Random::class, 'randArray'],
20852086
'argumentCount' => '0-5',
2087+
'spillageFunction' => true,
20862088
],
20872089
'RANDBETWEEN' => [
20882090
'category' => Category::CATEGORY_MATH_AND_TRIG,
@@ -2225,6 +2227,7 @@ class Calculation
22252227
'category' => Category::CATEGORY_MATH_AND_TRIG,
22262228
'functionCall' => [MathTrig\MatrixFunctions::class, 'sequence'],
22272229
'argumentCount' => '1-4',
2230+
'spillageFunction' => true,
22282231
],
22292232
'SERIESSUM' => [
22302233
'category' => Category::CATEGORY_MATH_AND_TRIG,
@@ -2285,11 +2288,13 @@ class Calculation
22852288
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
22862289
'functionCall' => [LookupRef\Sort::class, 'sort'],
22872290
'argumentCount' => '1-4',
2291+
'spillageFunction' => true,
22882292
],
22892293
'SORTBY' => [
22902294
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
22912295
'functionCall' => [LookupRef\Sort::class, 'sortBy'],
22922296
'argumentCount' => '2+',
2297+
'spillageFunction' => true,
22932298
],
22942299
'SQRT' => [
22952300
'category' => Category::CATEGORY_MATH_AND_TRIG,
@@ -2586,6 +2591,7 @@ class Calculation
25862591
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
25872592
'functionCall' => [LookupRef\Unique::class, 'unique'],
25882593
'argumentCount' => '1+',
2594+
'spillageFunction' => true,
25892595
],
25902596
'UPPER' => [
25912597
'category' => Category::CATEGORY_TEXT_AND_DATA,

0 commit comments

Comments
 (0)