mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-30 20:18:00 +00:00
Support _xlfn. prefix and add ISFORMULA, MODE.SNGL, STDEV.S, STDEV.P
This change adds support for newer functions that are prefixed by _xlfn. (#356). The calculation engine has been updated to recognise these as functions, and drop the _xlfn. part. It also add a couple of the new functions such as STDEV.S/P, MODE.SNGL, ISFORMULA. Fixes #356 Closes #390
This commit is contained in:
committed by
Adrien Crivelli
parent
1adc3a6688
commit
148bee1991
@@ -102,4 +102,19 @@ class CalculationTest extends TestCase
|
||||
['tr'],
|
||||
];
|
||||
}
|
||||
|
||||
public function testDoesHandleXlfnFunctions()
|
||||
{
|
||||
$calculation = Calculation::getInstance();
|
||||
|
||||
$tree = $calculation->parseFormula('=_xlfn.ISFORMULA(A1)');
|
||||
self::assertCount(3, $tree);
|
||||
$function = $tree[2];
|
||||
self::assertEquals('Function', $function['type']);
|
||||
|
||||
$tree = $calculation->parseFormula('=_xlfn.STDEV.S(A1:B2)');
|
||||
self::assertCount(5, $tree);
|
||||
$function = $tree[4];
|
||||
self::assertEquals('Function', $function['type']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user