Skip to content

Commit f19a73f

Browse files
committed
Proper Output for BASE Function
Fix #4638. Microsoft does not document BASE as being introduced in Excel 2010 or later, but apparently it was.
1 parent 889d26a commit f19a73f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/PhpSpreadsheet/Writer/Xlsx/FunctionPrefix.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ class FunctionPrefix
6666
. '|var[.]s'
6767
. '|weibull[.]dist'
6868
. '|z[.]test'
69+
// probably added with Excel 2010 but not properly documented
70+
. '|base'
6971
// functions added with Excel 2013
7072
. '|acot'
7173
. '|acoth'

tests/PhpSpreadsheetTests/Writer/Xlsx/FunctionPrefixTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public static function functionPrefixProvider(): array
3838
'DAYS/NETWORKDAYS 5' => ['NETWORKDAYS(DATE(2023,1,1),TODAY(), C:C)', 'NETWORKDAYS(DATE(2023,1,1),TODAY(), C:C)'],
3939
'COUNTIFS reclassified as Legacy' => ['COUNTIFS()', 'COUNTIFS()'],
4040
'SUMIFS reclassified as Legacy' => ['SUMIFS()', 'SUMIFS()'],
41+
'BASE improperly classified by MS' => ['_xlfn.BASE()', 'BASE()'],
4142
];
4243
}
4344
}

0 commit comments

Comments
 (0)