repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Style/Color/ColorChangeBrightness.php | tests/data/Style/Color/ColorChangeBrightness.php | <?php
declare(strict_types=1);
return [
// RGBA
[
'FFB2C1D1',
'FFAABBCC',
0.1,
],
// RGBA
[
'FF92A8BE',
'FFAABBCC',
-0.1,
],
// RGB
[
'B2C1D1',
'AABBCC',
0.1,
],
[
'92A8BE',
'AABBCC',
-0.1,
],
[
'FF1A1A',
'FF0000',
0.1,
],
[
'E60000',
'FF0000',
-0.1,
],
[
'FF8C8C',
'FF8080',
0.1,
],
[
'FF5959',
'FF8080',
-0.1,
],
[
'FF2626',
'FF0000',
0.15,
],
[
'D90000',
'FF0000',
-0.15,
],
[
'FF9393',
'FF8080',
0.15,
],
[
'FF4646',
'FF8080',
-0.15,
],
[
'FFF984',
'FFF008',
0.5,
],
[
'847D00',
'FFF008',
-0.5,
],
'issue 3550' => [
'558ED5',
'1F497D',
0.39997558519241921,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/BinaryComparisonOperations.php | tests/data/Calculation/BinaryComparisonOperations.php | <?php
declare(strict_types=1);
return [
[null, null, '=', true, true],
[null, null, '<>', false, false],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Calculation.php | tests/data/Calculation/Calculation.php | <?php
declare(strict_types=1);
/** @return mixed[] */
function calculationTestDataGenerator(): array
{
$dataArray1 = [
['please +', 'please *', 'increment'],
[1, 1, 1], // sum is 3
[3, 3, 3], // product is 27
];
$set0 = [3, $dataArray1, '=IF(A1="please +", SUM(A2:C2), 2)', 'E5'];
$set1 = [3, $dataArray1, '=IF(TRUE(), SUM(A2:C2), 2)', 'E5'];
$formula1 = '=IF(A1="please +",SUM(A2:C2),7 + IF(B1="please *", 4, 2))';
$set2 = [3, $dataArray1, $formula1, 'E5'];
$dataArray1[0][0] = 'not please + something else';
$set3 = [11, $dataArray1, $formula1, 'E5'];
$dataArray2 = [
['flag1', 'flag2', 'flag3', 'flag1'],
[1, 2, 3, 4],
[5, 6, 7, 8],
];
$set4 = [3, $dataArray2, '=IF($A$1=$B$1,A2,IF($A$1=$C$1,B2,IF($A$1=$D$1,C2,C3)))', 'E5'];
$dataArray2[0][0] = 'flag3';
$set5 = [2, $dataArray2, '=IF(A1=B1,A2,IF(A1=C1,B2,IF(A1=D1,C2,C3)))', 'E5'];
$dataArray3 = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
];
$set6 = [0, $dataArray3, '=IF(A1+B1>3,C1,0)', 'E5'];
$dataArray4 = [
['noflag', 0, 0],
[127000, 0, 0],
[10000, 0.03, 0],
[20000, 0.06, 0],
[40000, 0.09, 0],
[70000, 0.12, 0],
[90000, 0.03, 0],
];
$formula2 = '=IF(A1="flag",IF(A2<10, 0) + IF(A3<10000, 0))';
$set7 = [false, $dataArray4, $formula2, 'E5'];
$dataArray5 = [
[1, 2],
[3, 4],
['=A1+A2', '=SUM(B1:B2)'],
['take A', 0],
];
$formula3 = '=IF(A4="take A", A3, B3)';
$set8 = [4, $dataArray5, $formula3, 'E5', ['A3'], ['B3']];
$dataArray6 = [
['=IF(22,"a","b")'],
];
$set9 = ['a', $dataArray6, '=A1', 'A2'];
return [
$set0, $set1, $set2, $set3, $set4, $set5, $set6, $set7, $set8, $set9,
];
}
return calculationTestDataGenerator();
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Translations.php | tests/data/Calculation/Translations.php | <?php
declare(strict_types=1);
return [
[
'=DAGEN360(DATUM(2010;2;5);DATUM(2010;12;31);WAAR)',
'nl',
'=DAYS360(DATE(2010,2,5),DATE(2010,12,31),TRUE)',
],
[
'=DIAS360(DATA(2010;2;5);DATA(2010;12;31);VERDADEIRO)',
'pt_br',
'=DAYS360(DATE(2010,2,5),DATE(2010,12,31),TRUE)',
],
'Portuguese No Country' => [
'=DIA.SEMANA(10000)',
'pt',
'=WEEKDAY(10000)',
],
'Portuguese Unknown Country' => [
'=DIA.SEMANA(10000)',
'pt_xx',
'=WEEKDAY(10000)',
],
'Portuguese Brazil' => [
'=DIA.DA.SEMANA(10000)',
'pt_br',
'=WEEKDAY(10000)',
],
[
'=ДНЕЙ360(ДАТА(2010;2;5);ДАТА(2010;12;31);ИСТИНА)',
'ru',
'=DAYS360(DATE(2010,2,5),DATE(2010,12,31),TRUE)',
],
[
'=TEKST.SAMENVOEGEN(A1; " "; B1)',
'nl',
'=CONCATENATE(A1, " ", B1)',
],
[
'=TEKST.SAMENVOEGEN("""Hello "; B1; ""","; " I said.")',
'nl',
'=CONCATENATE("""Hello ", B1, """,", " I said.")',
],
[
'=ЕСЛИ(1;1;1)',
'ru',
'=IF(1,1,1)',
],
[
'=ИСКЛИЛИ(1;1)',
'ru',
'=XOR(1,1)',
],
[
'=TEKST.SAMENVOEGEN(JAAR(VANDAAG());
" is ";
ALS(
DAGEN(DATUM(JAAR(VANDAAG())+1; 1; 1); DATUM(JAAR(VANDAAG()); 1; 1)) = 365;
"NOT a Leap Year";
"a Leap Year"
)
)',
'nl',
'=CONCATENATE(YEAR(TODAY()),
" is ",
IF(
DAYS(DATE(YEAR(TODAY())+1, 1, 1), DATE(YEAR(TODAY()), 1, 1)) = 365,
"NOT a Leap Year",
"a Leap Year"
)
)',
],
'Spanish with accented character' => [
'=AÑO(B1)',
'es',
'=YEAR(B1)',
],
'Bulgarian with accent and period' => [
'=ПОЛУЧИТЬ.ДАННЫЕ.СВОДНОЙ.ТАБЛИЦЫ(B1)',
'bg',
'=GETPIVOTDATA(B1)',
],
'Czech with accent and period' => [
'=DSMODCH.VÝBĚR(B1)',
'cs',
'=DSTDEV(B1)',
],
'Turkish with accent and period' => [
'=İŞGÜNÜ.ULUSL(B1)',
'tr',
'=WORKDAY.INTL(B1)',
],
[
'=STØRST(ABS({2,-3;-4,5}); ABS{-2,3;4,-5})',
'nb',
'=MAX(ABS({2,-3;-4,5}), ABS{-2,3;4,-5})',
],
'not fooled by *RC' => [
'=3*RC(B1)',
'fr',
'=3*RC(B1)',
],
'handle * for ROW' => [
'=3*LIGNE(B1)',
'fr',
'=3*ROW(B1)',
],
'handle _xlfn' => [
'=MAXWENNS(C5:C10; C5:C10; "<30")',
'de',
'=_xlfn.MAXIFS(C5:C10, C5:C10, "<30")',
],
'handle _xlfn and _xlws' => [
'=ФИЛЬТР(A5:D20;C5:C20=H2;"")',
'ru',
'=_xlfn._xlws.FILTER(A5:D20,C5:C20=H2,"")',
],
'implicit intersection' => [
'=@INDEKS(A1:A10;B1)',
'nb',
'=@INDEX(A1:A10,B1)',
],
'preserve literal _xlfn.' => [
'=@INDEKS(A1:A10;"_xlfn.")',
'nb',
'=@INDEX(A1:A10,"_xlfn.")',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/FunctionsAsString.php | tests/data/Calculation/FunctionsAsString.php | <?php
declare(strict_types=1);
return [
// Note that these are meant to test the parser, not a comprehensive
// test of all Excel functions, which tests are handled elsewhere.
[6, '=SUM(1,2,3)'],
[60, '=SUM(A1:A3)'],
[70, '=SUM(A1,A2,A4)'],
[41, '=SUM(1,namedCell)'],
[50, '=A1+namedCell'],
[3, '=MATCH(6,{4,5,6,2},0)'],
['#N/A', '=MATCH(8,{4,5,6,2},0)'],
[7, '=HLOOKUP(5,{1,5,10;2,6,11;3,7,12;4,8,13},3,FALSE)'],
['Hello, World.', '=CONCATENATE("Hello, ", "World.")'],
['{NON-EMPTY SET}', '=UPPER("{non-EMPTY set}")'], // braces not used for matrix
['upper', '=LOWER(B1)'],
[false, '=and(B2,B3)'],
[0, '=acos(1)'],
[0.785398, '=round(atan({1,2,3}),6)'], // {1,2,3} will be flattened to 1
[2, '=minverse({-2.5,1.5;2,-1})'], // 2 is the flattened result of {2,3;4,5}
[4, '=MDETERM(MMULT({1,2;3,4},{5,6;7,8}))'], // multiple matrices
[110, '=SUM(A1,Sheet2!$A$1)'], // different sheet absolute address
[220, '=SUM(A2,A2B)'], // defined name on different sheet
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/CHOOSECOLS.php | tests/data/Calculation/LookupRef/CHOOSECOLS.php | <?php
declare(strict_types=1);
return [
'select last column' => [
[
['c'],
['f'],
['i'],
['l'],
['o'],
['r'],
['u'],
['x'],
['#'],
],
'=CHOOSECOLS(B3:D11, -1)',
],
'select 1 column' => [
[
['b'],
['e'],
['h'],
['k'],
['n'],
['q'],
['t'],
['w'],
['z'],
],
'=CHOOSECOLS(B3:D11, 2)',
],
'fractional column' => [
[
['b'],
['e'],
['h'],
['k'],
['n'],
['q'],
['t'],
['w'],
['z'],
],
'=CHOOSECOLS(B3:D11, 2.8)',
],
'numeric string column' => [
[
['b'],
['e'],
['h'],
['k'],
['n'],
['q'],
['t'],
['w'],
['z'],
],
'=CHOOSECOLS(B3:D11, " 2.8 ")',
],
'multiple columns including duplicates' => [
[
['b', 'a', 'b'],
['e', 'd', 'e'],
['h', 'g', 'h'],
['k', 'j', 'k'],
['n', 'm', 'n'],
['q', 'p', 'q'],
['t', 's', 't'],
['w', 'v', 'w'],
['z', 'y', 'z'],
],
'=CHOOSECOLS(B3:D11, 2, 1, 2)',
],
'multiple columns mixed +/- mixed scalar/matrix' => [
[
['b', 'a', 'b'],
['e', 'd', 'e'],
['h', 'g', 'h'],
['k', 'j', 'k'],
['n', 'm', 'n'],
['q', 'p', 'q'],
['t', 's', 't'],
['w', 'v', 'w'],
['z', 'y', 'z'],
],
'=CHOOSECOLS(B3:D11, 2, {-3, 2})',
],
'reverse Columns' => [
[
['c', 'b', 'a'],
['f', 'e', 'd'],
['i', 'h', 'g'],
['l', 'k', 'j'],
['o', 'n', 'm'],
['r', 'q', 'p'],
['u', 't', 's'],
['x', 'w', 'v'],
['#', 'z', 'y'],
],
'=CHOOSECOLS(B3:D11, SEQUENCE(COLUMNS(B3:D11),,COLUMNS(B3:D11),-1))',
],
'inline array' => [
[
['c', 'b'],
['f', 'e'],
['i', 'h'],
['l', 'k'],
['o', 'n'],
['r', 'q'],
['u', 't'],
['x', 'w'],
['#', 'z'],
],
'=CHOOSECOLS(B3:D11, {3;2})',
],
'inline array with negative numbers' => [
[
['b', 'c'],
['e', 'f'],
['h', 'i'],
['k', 'l'],
['n', 'o'],
['q', 'r'],
['t', 'u'],
['w', 'x'],
['z', '#'],
],
'=CHOOSECOLS(B3:D11, {-2;-1})',
],
'defined name' => [
[
['b', 'c'],
['e', 'f'],
['h', 'i'],
['k', 'l'],
['n', 'o'],
['q', 'r'],
['t', 'u'],
['w', 'x'],
['z', '#'],
],
'=CHOOSECOLS(definedname, {-2;-1})',
],
'only 1 argument' => [
'exception',
'=CHOOSECOLS(B3:D11)',
],
'non-numeric column' => [
'#VALUE!',
'=CHOOSECOLS(B3:D11, "x")',
],
'positive column too large' => [
'#VALUE!',
'=CHOOSECOLS(B3:D11, 4)',
],
'negative column too large' => [
'#VALUE!',
'=CHOOSECOLS(B3:D11, 1, -4)',
],
'zero column' => [
'#VALUE!',
'=CHOOSECOLS(B3:D11, 0)',
],
'single cell' => [
[
['a'],
],
'=CHOOSECOLS(B3, 1)',
],
'inline array rather than range' => [
[
[2, 1, 1],
[4, 3, 3],
[6, 5, 5],
],
'=CHOOSECOLS({1,2;3,4;5,6}, " 2.4 ", 1, 1)',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/INDEXonSpreadsheet.php | tests/data/Calculation/LookupRef/INDEXonSpreadsheet.php | <?php
declare(strict_types=1);
return [
'Single Cell' => [
1, // Expected
[
[1],
],
0,
],
'Row Number omitted' => [
'exception', // Expected
[
[1],
],
],
'Negative Row' => [
'#VALUE!', // Expected
[
[1],
[2],
],
-1,
],
'Row > matrix rows' => [
'#REF!', // Expected
[
[1],
[2],
],
10,
],
'Row is not a number' => [
'#NAME?', // Expected
[
[1],
[2],
],
'NaN',
],
'Row is reference to non-number' => [
'#VALUE!', // Expected
[
[1],
[2],
],
'ZZ98',
],
'Row is quoted non-numeric result' => [
'#VALUE!', // Expected
[
[1],
[2],
],
'"string"',
],
'Row is Error' => [
'#N/A', // Expected
[
[1],
[2],
],
'#N/A',
],
'Return row 2 only one column' => [
'xyz', // Expected
[
['abc'],
['xyz'],
],
2,
],
'Return row 1 col 2' => [
'def', // Expected
[
['abc', 'def'],
['xyz', 'tuv'],
],
1,
2,
],
'Column number omitted from 2-column matrix' => [
'abc', // Expected
[
['abc', 'def'],
['xyz', 'tuv'],
],
1,
],
'Column number omitted from 1-column matrix' => [
'xyz', // Expected
[
['abc'],
['xyz'],
],
2,
],
'Return row 2 from larger matrix (Phpspreadsheet flattens expected [2,4] to single value)' => [
2, // Expected
// Input
[
[1, 3],
[2, 4],
],
2,
0,
],
'Negative Column' => [
'#VALUE!', // Expected
[
[1, 3],
[2, 4],
],
0,
-1,
],
'Column > matrix columns' => [
'#REF!', // Expected
[
[1, 3],
[2, 4],
],
2,
10,
],
'Column is not a number' => [
'#NAME?', // Expected
[
[1],
[2],
],
1,
'NaN',
],
'Column is reference to non-number' => [
'#VALUE!', // Expected
[
[1],
[2],
],
1,
'ZZ98',
],
'Column is quoted non-number' => [
'#VALUE!', // Expected
[
[1],
[2],
],
1,
'"string"',
],
'Column is Error' => [
'#N/A', // Expected
[
[1],
[2],
],
1,
'#N/A',
],
'Row 2 Column 2' => [
4, // Expected
[
[1, 3],
[2, 4],
],
2,
2,
],
'Row 2 Column 2 Alphabetic' => [
'Pears',
[
['Apples', 'Lemons'],
['Bananas', 'Pears'],
],
2,
2,
],
'Row 2 Column 1 Alphabetic' => [
'Bananas',
[
['Apples', 'Lemons'],
['Bananas', 'Pears'],
],
2,
1,
],
'Row 2 Column 0 (PhpSpreadsheet flattens result)' => [
'Bananas',
[
['Apples', 'Lemons'],
['Bananas', 'Pears'],
],
2,
0,
],
'Row 5 column 2' => [
3,
[
[4, 6],
[5, 3],
[6, 9],
[7, 5],
[8, 3],
],
5,
2,
],
'Row 5 column 0 (flattened)' => [
8,
[
[4, 6],
[5, 3],
[6, 9],
[7, 5],
[8, 3],
],
5,
0,
],
'Row 0 column 2 (flattened)' => [
6,
[
[4, 6],
[5, 3],
[6, 9],
[7, 5],
[8, 3],
],
0,
2,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/TAKE.php | tests/data/Calculation/LookupRef/TAKE.php | <?php
declare(strict_types=1);
return [
'take last row' => [
[
['y', 'z', '#'],
],
'=TAKE(B3:D11, -1)',
],
'take first 2 rows' => [
[
['a', 'b', 'c'],
['d', 'e', 'f'],
],
'=TAKE(B3:D11, 2)',
],
'take last 2 columns' => [
[
['b', 'c'],
['e', 'f'],
['h', 'i'],
['k', 'l'],
['n', 'o'],
['q', 'r'],
['t', 'u'],
['w', 'x'],
['z', '#'],
],
'=TAKE(B3:D11, , -2)',
],
'take first column' => [
[
['a'],
['d'],
['g'],
['j'],
['m'],
['p'],
['s'],
['v'],
['y'],
],
'=TAKE(B3:D11, , 1)',
],
'take last row first column' => [
[
['y'],
],
'=TAKE(B3:D11, -1, 1)',
],
'take first 2 rows last 2 columns' => [
[
['b', 'c'],
['e', 'f'],
],
'=TAKE(B3:D11, 2, -2)',
],
'take first 2 rows last 2 columns fractional and string' => [
[
['b', 'c'],
['e', 'f'],
],
'=TAKE(B3:D11, 2.8, " -2.8 ")',
],
'named range' => [
[
['x'],
['#'],
],
'=TAKE(definedname, -2,-1)',
],
'only 1 argument' => [
'exception',
'=TAKE(B3:D11)',
],
'non-numeric row' => [
'#VALUE!',
'=TAKE(B3:D11, "x")',
],
'non-numeric column' => [
'#VALUE!',
'=TAKE(B3:D11, 1, "x")',
],
'positive row too large' => [
[
['a', 'b', 'c'],
['d', 'e', 'f'],
['g', 'h', 'i'],
['j', 'k', 'l'],
['m', 'n', 'o'],
['p', 'q', 'r'],
['s', 't', 'u'],
['v', 'w', 'x'],
['y', 'z', '#'],
],
'=TAKE(B3:D11, 20)',
],
'negative row too large' => [
[
['a', 'b', 'c'],
['d', 'e', 'f'],
['g', 'h', 'i'],
['j', 'k', 'l'],
['m', 'n', 'o'],
['p', 'q', 'r'],
['s', 't', 'u'],
['v', 'w', 'x'],
['y', 'z', '#'],
],
'=TAKE(B3:D11, -20)',
],
'positive column too large' => [
[
['a', 'b', 'c'],
['d', 'e', 'f'],
['g', 'h', 'i'],
['j', 'k', 'l'],
['m', 'n', 'o'],
['p', 'q', 'r'],
['s', 't', 'u'],
['v', 'w', 'x'],
['y', 'z', '#'],
],
'=TAKE(B3:D11, , 20)',
],
'negative column too large' => [
[
['a', 'b', 'c'],
['d', 'e', 'f'],
['g', 'h', 'i'],
['j', 'k', 'l'],
['m', 'n', 'o'],
['p', 'q', 'r'],
['s', 't', 'u'],
['v', 'w', 'x'],
['y', 'z', '#'],
],
'=TAKE(B3:D11, , -20)',
],
'row okay column too large' => [
[
['y', 'z', '#'],
],
'=TAKE(B3:D11, -1, 20)',
],
'zero row' => [
'#VALUE!',
'=TAKE(B3:D11, 0)',
],
'zero column' => [
'#VALUE!',
'=TAKE(B3:D11, 1, 0)',
],
'single cell' => [
[
['a'],
],
'=TAKE(B3, 1)',
],
'inline array rather than range' => [
[
[1, 2],
],
'=TAKE({1,2;3,4;5,6}, 1, 2)',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/MATCH.php | tests/data/Calculation/LookupRef/MATCH.php | <?php
declare(strict_types=1);
return [
'unsorted numeric array still finds match with type 1?' => [
2, // Expected
2, // Input
[2, 0, 4, 3],
1,
],
'unsorted array still finds match with type 1?' => [
6,
'Amplitude',
['Aardvark', 'Apple', 'A~*e', 'A*e', 'A[solve', 'Amplitude', 'Adverse', 'Apartment'],
1,
],
// Third argument = 0
[
1, // Expected
2, // Input
[2, 3, 4, 3],
0,
],
[
'#N/A', // Expected
2, // Input
[1, 0, 4, 3],
0,
],
[
1, // Expected
2, // Input
[2, 0, 0, 3],
0,
],
[
2, // Expected
0, // Input
[2, 0, 0, 3],
0,
],
// Third argument = 1
[
1, // Expected
2, // Input
[2, 3, 4, 3],
1,
],
[
3, // Expected
2, // Input
[2, 0, 0, 3],
1,
],
[
4, // Expected
4, // Input
[2, 0, 0, 3],
1,
],
// Third argument = -1
[
1, // Expected
2, // Input
[2, 0, 0, 3],
-1,
],
[
4, // Expected
2, // Input
[3, 3, 4, 5],
-1,
],
[
1, // Expected
5, // Input
[8, 4, 3, 2],
-1,
],
[
'#N/A', // Expected
6, // Input
[3, 5, 6, 8],
-1,
],
[
1, // Expected
6, // Input
[8, 5, 4, 2],
-1,
],
[
3, // Expected
4, // Input
[5, 8, 4, 2],
-1,
],
[
2, // Expected
4, // Input
[8, 8, 3, 2],
-1,
],
[ // Default matchtype
4, // Expected
4, // Input
[2, 0, 0, 3],
null,
],
// match on ranges with empty cells
[
3, // Expected
4, // Input
[1, null, 4, null, 8],
1,
],
[
3, // Expected
5, // Input
[1, null, 4, null, null],
1,
],
// 0s are causing errors, because things like 0 == 'x' is true. Thanks PHP!
'0 does not match x' => [
3,
'x',
[0, 0, 'x', 'x', 'x'],
0,
],
[
2,
'a',
[false, 'a', 1],
-1,
],
[
'#N/A', // Expected
0,
['x', true, false],
-1,
],
[
'#N/A', // Expected
true,
['a', 'b', 'c'],
-1,
],
[
'#N/A', // Expected
true,
[0, 1, 2],
-1,
],
[
'#N/A', // Expected
true,
[0, 1, 2],
0,
],
[
'#N/A', // Expected
true,
[0, 1, 2],
1,
],
[
1, // Expected
true,
[true, true, true],
-1,
],
[
1, // Expected
true,
[true, true, true],
0,
],
[
3, // Expected
true,
[true, true, true],
1,
],
// lookup stops when value < searched one
[
5, // Expected
6,
[true, false, 'a', 'z', 222222, 2, 99999999],
-1,
],
// when mixing numeric types
[
4, // Expected
4.6,
[1, 2, 3, 4, 5],
1,
],
[
4, // Expected
4,
[1, 2, 3, 3.8, 5],
1,
],
// if element of same data type met and it is < than searched one #N/A - no further processing
[
'#N/A', // Expected
6,
[true, false, 'a', 'z', 2, 888],
-1,
],
'number compared to string type -1' => [
'#N/A', // Expected
6,
['6'],
-1,
],
'number compared to string type 0' => [
'#N/A', // Expected
6,
['6'],
0,
],
'number compared to string type 1' => [
'#N/A', // Expected
6,
['6'],
1,
],
'string compared to number type -1' => [
'#N/A', // Expected
'6',
[6],
-1,
],
'string compared to number type 0' => [
'#N/A', // Expected
'6',
[6],
0,
],
'string compared to number type 1' => [
'#N/A', // Expected
'6',
[6],
1,
],
// expression match
[
2, // Expected
'a?b',
['a', 'abb', 'axc'],
0,
],
[
1, // Expected
'a*',
['aAAAAAAA', 'as', 'az'],
0,
],
[
3, // Expected
'1*11*1',
['abc', 'efh', '1a11b1'],
0,
],
[
3, // Expected
'1*11*1',
['abc', 'efh', '1a11b1'],
0,
],
[
2, // Expected
'a*~*c',
['aAAAAA', 'a123456*c', 'az', 'alembic'],
0,
],
[
3, // Expected
'a*123*b',
['aAAAAA', 'a123456*c', 'a99999123b'],
0,
],
[
1, // Expected
'*',
['aAAAAA', 'a111123456*c', 'qq'],
0,
],
[
2, // Expected
'?',
['aAAAAA', 'a', 'a99999123b'],
0,
],
[
'#N/A', // Expected
'?',
[1, 22, 333],
0,
],
[
3, // Expected
'???',
[1, 22, 'aaa'],
0,
],
[
3, // Expected
'*',
[1, 22, 'aaa'],
0,
],
[
'#N/A', // Expected
'abc',
[1, 22, 'aaa'],
0,
],
[
'#N/A', // Expected (Invalid lookup value)
new DateTime('2021-03-11'),
[1, 22, 'aaa'],
1,
],
'int match type other than 0/1/-1 is accepted' => [
3, // Expected (Invalid match type)
'abc',
[1, 22, 'aaa'],
123,
],
'float match type is accepted' => [
3, // Expected (Invalid match type)
'abc',
[1, 22, 'aaa'],
123.5,
],
'numeric string match type is accepted' => [
3, // Expected (Invalid match type)
'abc',
[1, 22, 'aaa'],
'89.7',
],
'non-numeric string match type is not accepted' => [
'#VALUE!', // Expected (Invalid match type)
'abc',
[1, 22, 'aaa'],
'"x"',
],
'empty lookup array' => [
'#N/A', // Expected (Empty lookup array)
'abc',
[],
1,
],
'wildcard match 1 with type -1' => [
[8, 2], // LibreOffice matches wildcard but shouldn't
'A*e',
['Aardvark', 'Apple', 'Armadillo', 'Acre', 'Absolve', 'Amplitude', 'Adverse', 'Apartment'],
-1,
],
[
2,
'A*e',
['Aardvark', 'Apple', 'Armadillo', 'Acre', 'Absolve', 'Amplitude', 'Adverse', 'Apartment'],
0,
],
'wildcard match with tilde' => [
4,
'A~*e',
['Aardvark', 'Apple', 'A~*e', 'A*e', 'Absolve', 'Amplitude', 'Adverse', 'Apartment'],
0,
],
'string with preg_quote escaped character' => [
5,
'A[solve',
['Aardvark', 'Apple', 'A~*e', 'A*e', 'A[solve', 'Amplitude', 'Adverse', 'Apartment'],
0,
],
// duplicate test deleted - see 'wildcard with type 1' below
// end of deletions
'wildcard match 2 with type -1' => [
[8, 5],
'A?s*e',
['Aardvark', 'Apple', 'Armadillo', 'Acre', 'Absolve', 'Amplitude', 'Adverse', 'Apartment'],
-1,
],
[
5,
'A?s*e',
['Aardvark', 'Apple', 'Armadillo', 'Acre', 'Absolve', 'Amplitude', 'Adverse', 'Apartment'],
0,
],
'wildcard with type 1' => [
['#N/A', 2], // LibreOffice matches wildcard but shouldn't
'A*e',
['Aardvark', 'Apple', 'Armadillo', 'Acre', 'Absolve', 'Amplitude', 'Adverse', 'Apartment'],
1,
],
'wildcard match 3 with type -1' => [
[8, 3], // LibreOffice matches wildcard but shouldn't
'*verse',
['Obtuse', 'Amuse', 'Obverse', 'Inverse', 'Assurance', 'Amplitude', 'Adverse', 'Apartment'],
-1,
],
[
3,
'*verse',
['Obtuse', 'Amuse', 'Obverse', 'Inverse', 'Assurance', 'Amplitude', 'Adverse', 'Apartment'],
0,
],
[
3, // Expected
'*~~*', // contains a tilde
['aAAAAA', 'a123456*c', 'abc~xyz', 'alembic'],
0,
],
[
2, // Expected
'abc/123*', // wildcard search contains a forward slash
['abc123fff', 'abc/123fff'],
0,
],
'float lookup int array type0' => [
1, // Expected
2.0, // Input
[2, 3, 4, 5],
0,
],
'int lookup float array type0' => [
2, // Expected
3, // Input
[2, 3.0, 4, 5],
0,
],
'int lookup float array type0 not equal' => [
'#N/A', // Expected
3, // Input
[2, 3.1, 4, 5],
0,
],
'float lookup int array type0 not equal' => [
'#N/A', // Expected
3.1, // Input
[2, 3, 4, 5],
0,
],
'float lookup int array type1 equal' => [
1, // Expected
2.0, // Input
[2, 3, 4, 5],
1,
],
'int lookup float array type1 equal' => [
2, // Expected
3, // Input
[2, 3.0, 4, 5],
1,
],
'float lookup int array type1 less' => [
1, // Expected
2.5, // Input
[2, 3, 4, 5],
1,
],
'int lookup float array type1 less' => [
2, // Expected
3, // Input
[2, 2.9, 4, 5],
1,
],
'float lookup int array type -1 equal' => [
4, // Expected
2.0, // Input
[5, 4, 3, 2],
-1,
],
'int lookup float array type -1 equal' => [
3, // Expected
3, // Input
[5, 4, 3.0, 2],
-1,
],
'float lookup int array type -1 greater' => [
2, // Expected
3.5, // Input
[5, 4, 3, 2],
-1,
],
'int lookup float array type -1 greater' => [
2, // Expected
3, // Input
[5, 4, 2.9, 2],
-1,
],
'default type is type1' => [
3, // Expected
4, // Input
[1, 2, 3, 5],
],
'same as previous but explicit type1' => [
3, // Expected
4, // Input
[1, 2, 3, 5],
],
'same as previous but type0 so different result' => [
'#N/A', // Expected
4, // Input
[1, 2, 3, 5],
0,
],
'undefined behavior N/A in Excel 4 in PhpSpreadsheet' => [
'incomplete', // Expected
4, // Input
[8, 6, 3, 1],
],
'same as previous but type -1 so match' => [
2, // Expected
4, // Input
[8, 6, 3, 1],
-1,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/COLUMNS.php | tests/data/Calculation/LookupRef/COLUMNS.php | <?php
declare(strict_types=1);
return [
[
1,
null,
],
[
1,
'',
],
[
'#VALUE!',
'foo',
],
[
0,
[],
],
[
1,
[1],
],
[
1,
[1, 1],
],
[
2,
[[1, 1]],
],
[
1,
['a' => [1, 1]],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/EXPAND.php | tests/data/Calculation/LookupRef/EXPAND.php | <?php
declare(strict_types=1);
return [
'Add 2 rows' => [
[
['a', 'b', 'c'],
['d', 'e', 'f'],
['#N/A', '#N/A', '#N/A'],
['#N/A', '#N/A', '#N/A'],
],
'=EXPAND(B3:D4, 4)',
],
'Add 1 colun' => [
[
['a', 'b', 'c', '#N/A'],
['d', 'e', 'f', '#N/A'],
],
'=EXPAND(B3:D4, , 4)',
],
'Add 1 row 2 columns set cells to 0' => [
[
['a', 'b', 'c', 0, 0],
['d', 'e', 'f', 0, 0],
[0, 0, 0, 0, 0],
],
'=EXPAND(B3:D4, 3, 5, 0)',
],
'Fractional row and column' => [
[
['a', 'b', 'c', 0, 0],
['d', 'e', 'f', 0, 0],
[0, 0, 0, 0, 0],
],
'=EXPAND(B3:D4, 3.2, 5.8, 0)',
],
'only 1 argument' => [
'exception',
'=EXPAND(B3:D4)',
],
'non-numeric row' => [
'#VALUE!',
'=EXPAND(B3:D4, "x")',
],
'non-numeric column' => [
'#VALUE!',
'=EXPAND(B3:D4, 1, "x")',
],
'row too small' => [
'#VALUE!',
'=EXPAND(B3:D4, 1)',
],
'column too small' => [
'#VALUE!',
'=EXPAND(B3:D4, , 2)',
],
'single cell' => [
[
['a', 'xx'],
['xx', 'xx'],
],
'=EXPAND(B3, 2, 2, "xx")',
],
'inline array rather than range' => [
[
[1, 2, 0, 0],
[3, 4, 0, 0],
[5, 6, 0, 0],
[0, 0, 0, 0],
],
'=EXPAND({1,2;3,4;5,6}, 4.4, " 4.5 ", 0)',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/LOOKUP.php | tests/data/Calculation/LookupRef/LOOKUP.php | <?php
declare(strict_types=1);
return [
[ // Office reference example #1
'orange',
4.19,
[
[4.14],
[4.19],
[5.17],
[5.77],
[6, 39],
],
[
['red'],
['orange'],
['yellow'],
['green'],
['blue'],
],
],
[ // Office reference example #2
'yellow',
5.75,
[
[4.14],
[4.19],
[5.17],
[5.77],
[6, 39],
],
[
['red'],
['orange'],
['yellow'],
['green'],
['blue'],
],
],
[ // Office reference example #3
'blue',
7.66,
[
[4.14],
[4.19],
[5.17],
[5.77],
[6, 39],
],
[
['red'],
['orange'],
['yellow'],
['green'],
['blue'],
],
],
[ // Office reference example #4
'#N/A',
0,
[
[4.14],
[4.19],
[5.17],
[5.77],
[6, 39],
],
[
['red'],
['orange'],
['yellow'],
['green'],
['blue'],
],
],
[ // Array form test
'orange',
4.2,
[
[4.14, 'red'],
[4.19, 'orange'],
[5.17, 'yellow'],
[5.77, 'green'],
[6, 39, 'blue'],
],
],
[
5,
'x',
[
[0, 0, 0, 'x', 'x'],
[1, 2, 3, 4, 5],
],
],
[
'author_101',
101,
[
[100],
[101],
[102],
],
[
['author_100'],
['author_101'],
['author_102'],
],
],
[
'author_101',
101,
[
[100],
[101],
[102],
],
[
['author_100', 'author_101', 'author_102'],
],
],
[
101,
101,
[
[100],
[101],
],
],
[
'#N/A',
'10y2',
[
['5y-1'],
['10y1'],
['10y2'],
],
[
[2.0],
[7.0],
[10.0],
],
],
[
'#N/A',
'10y2',
'Not an Array',
[
[2.0],
[7.0],
[10.0],
],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/COLUMN.php | tests/data/Calculation/LookupRef/COLUMN.php | <?php
declare(strict_types=1);
return [
[
1,
null,
],
[
2,
'B13',
],
[
[2, 3, 4],
'B2:D2',
],
[
2,
['B' => 'B5', 'C' => 'C5', 'D' => 'D5'],
],
[
[2, 3, 4],
'B2:D3',
],
[
[2, 3, 4],
'Sheet1!B2:D2',
],
[
[2, 3, 4],
'"WorkSheet #1"!B2:D2',
],
[1, []],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/INDEX.php | tests/data/Calculation/LookupRef/INDEX.php | <?php
declare(strict_types=1);
return [
[
[20 => ['R' => 1]], // Expected
// Input
[20 => ['R' => 1]],
],
'Negative Row' => [
'#VALUE!', // Expected
// Input
[
20 => ['R' => 1],
21 => ['R' => 2],
],
-1,
],
'Row > matrix rows' => [
'#REF!', // Expected
// Input
[
20 => ['R' => 1],
21 => ['R' => 2],
],
10,
],
'Row is not a number' => [
'#VALUE!', // Expected
// Input
[
20 => ['R' => 1],
21 => ['R' => 2],
],
'NaN',
],
'Row is Error' => [
'#N/A', // Expected
// Input
[
20 => ['R' => 1],
21 => ['R' => 2],
],
'#N/A',
],
'Return row 2' => [
[21 => ['R' => 2]], // Expected
// Input
[
20 => ['R' => 1],
21 => ['R' => 2],
],
2,
],
'Return row 2 from larger matrix' => [
[21 => ['R' => 2, 'S' => 4]], // Expected
// Input
[
'20' => ['R' => 1, 'S' => 3],
'21' => ['R' => 2, 'S' => 4],
],
2,
0,
],
'Negative Column' => [
'#VALUE!', // Expected
// Input
[
'20' => ['R' => 1, 'S' => 3],
'21' => ['R' => 2, 'S' => 4],
],
0,
-1,
],
'Column > matrix columns' => [
'#REF!', // Expected
// Input
[
'20' => ['R' => 1, 'S' => 3],
'21' => ['R' => 2, 'S' => 4],
],
2,
10,
],
'Column is not a number' => [
'#VALUE!', // Expected
// Input
[
20 => ['R' => 1],
21 => ['R' => 2],
],
1,
'NaN',
],
'Column is Error' => [
'#N/A', // Expected
// Input
[
20 => ['R' => 1],
21 => ['R' => 2],
],
1,
'#N/A',
],
[
4, // Expected
// Input
[
'20' => ['R' => 1, 'S' => 3],
'21' => ['R' => 2, 'S' => 4],
],
2,
2,
],
[
[4], // Expected
// Input
[
'20' => ['R' => 1, 'S' => 3],
'21' => ['R' => 2, 'S' => 4],
],
[
'21' => ['R' => 2],
],
[
'21' => ['R' => 2],
],
],
[
'Pears',
[
['Apples', 'Lemons'],
['Bananas', 'Pears'],
],
2,
2,
],
[
'Bananas',
[
['Apples', 'Lemons'],
['Bananas', 'Pears'],
],
2,
1,
],
[
[1 => ['Bananas', 'Pears']],
[
['Apples', 'Lemons'],
['Bananas', 'Pears'],
],
2,
0,
],
[
3,
[
[4, 6],
[5, 3],
[6, 9],
[7, 5],
[8, 3],
],
5,
2,
],
[
[4 => [8, 3]],
[
[4, 6],
[5, 3],
[6, 9],
[7, 5],
[8, 3],
],
5,
0,
],
[
[
[6],
[3],
[9],
[5],
[3],
],
[
[4, 6],
[5, 3],
[6, 9],
[7, 5],
[8, 3],
],
0,
2,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/ROW.php | tests/data/Calculation/LookupRef/ROW.php | <?php
declare(strict_types=1);
return [
[
1,
null,
],
[
10,
'C10',
],
[
[[10], [11], [12]],
'C10:C12',
],
[
[[10], [11], [12]],
'C10:D12',
],
[
4,
[
4 => ['B' => 'B5', 'C' => 'C5', 'D' => 'D5'],
5 => ['B' => 'B5', 'C' => 'C5', 'D' => 'D5'],
],
],
[
[[10], [11], [12]],
'Sheet1!C10:C12',
],
[
[[10], [11], [12]],
'"WorkSheet #1"!C10:C12',
],
[1, []],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/ROWonSpreadsheet.php | tests/data/Calculation/LookupRef/ROWonSpreadsheet.php | <?php
declare(strict_types=1);
return [
'current row' => [3, 'omitted'],
'global name $E$2:$E$6' => [2, 'namedrangex'],
'global name $F$2:$H$2' => [2, 'namedrangey'],
'global name $F$4:$H$4' => [4, 'namedrange3'],
'local name $F$5:$H$5' => [5, 'namedrange5'],
'out of scope name' => ['#NAME?', 'localname'],
'qualified cell existing sheet' => [1, 'OtherSheet!A1'],
'qualified cell non-existent sheet' => [1, 'UnknownSheet!A1'],
'single cell absolute' => [7, '$C$7'],
'single cell relative' => [7, 'C7'],
'unknown name' => ['#NAME?', 'namedrange2'],
'unknown name as first part of range' => ['#NAME?', 'InvalidCell:A2'],
'unknown name as second part of range' => ['#NAME?', 'A2:InvalidCell'],
'qualified name' => [6, 'OtherSheet!localname'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/ROWSonSpreadsheet.php | tests/data/Calculation/LookupRef/ROWSonSpreadsheet.php | <?php
declare(strict_types=1);
return [
'global $E$2:$E$6' => [5, 'namedrangex'],
'global $F$2:$H$2' => [1, 'namedrangey'],
'global $F$4:$H$4' => [1, 'namedrange3'],
'local in scope $F$5:$H$5' => [1, 'namedrange5'],
'local out of scope' => ['#NAME?', 'localname'],
'non-existent sheet' => [5, 'UnknownSheet!B2:K6'],
'not enough arguments' => ['exception', 'omitted'],
'other existing sheet' => [6, 'OtherSheet!A1:H6'],
'qualified in scope $F$5:$H$5' => [1, 'ThisSheet!namedrange5'],
'single cell absolute' => [1, '$C$7'],
'single cell relative' => [1, 'C7'],
'unknown name' => ['#NAME?', 'InvalidCellAddress'],
'unknown name as first part of range' => ['#NAME?', 'Invalid:A2'],
'unknown name as second part of range' => ['#NAME?', 'A2:Invalid'],
'qualified out of scope $F$6:$H$6' => [1, 'OtherSheet!localname'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/DROP.php | tests/data/Calculation/LookupRef/DROP.php | <?php
declare(strict_types=1);
return [
'drop last row' => [
[
['a', 'b', 'c'],
['d', 'e', 'f'],
['g', 'h', 'i'],
['j', 'k', 'l'],
['m', 'n', 'o'],
['p', 'q', 'r'],
['s', 't', 'u'],
['v', 'w', 'x'],
],
'=DROP(B3:D11, -1)',
],
'drop first 2 rows' => [
[
['g', 'h', 'i'],
['j', 'k', 'l'],
['m', 'n', 'o'],
['p', 'q', 'r'],
['s', 't', 'u'],
['v', 'w', 'x'],
['y', 'z', '#'],
],
'=DROP(B3:D11, 2)',
],
'drop last 2 columns' => [
[
['a'],
['d'],
['g'],
['j'],
['m'],
['p'],
['s'],
['v'],
['y'],
],
'=DROP(B3:D11, , -2)',
],
'drop first column' => [
[
['b', 'c'],
['e', 'f'],
['h', 'i'],
['k', 'l'],
['n', 'o'],
['q', 'r'],
['t', 'u'],
['w', 'x'],
['z', '#'],
],
'=DROP(B3:D11, , 1)',
],
'drop last row first column' => [
[
['b', 'c'],
['e', 'f'],
['h', 'i'],
['k', 'l'],
['n', 'o'],
['q', 'r'],
['t', 'u'],
['w', 'x'],
],
'=DROP(B3:D11, -1, 1)',
],
'drop first 2 rows last 2 columns' => [
[
['g'],
['j'],
['m'],
['p'],
['s'],
['v'],
['y'],
],
'=DROP(B3:D11, 2, -2)',
],
'drop first 2 rows last 2 columns fractional and string' => [
[
['g'],
['j'],
['m'],
['p'],
['s'],
['v'],
['y'],
],
'=DROP(B3:D11, 2.8, " -2.8 ")',
],
'named range' => [
[
['g'],
['j'],
['m'],
['p'],
['s'],
['v'],
['y'],
],
'=DROP(definedname, 2,-2)',
],
'only 1 argument' => [
'exception',
'=DROP(B3:D11)',
],
'non-numeric row' => [
'#VALUE!',
'=DROP(B3:D11, "x")',
],
'non-numeric column' => [
'#VALUE!',
'=DROP(B3:D11, 1, "x")',
],
'positive row too large' => [
'#VALUE!',
'=DROP(B3:D11, 20)',
],
'negative row too large' => [
'#VALUE!',
'=DROP(B3:D11, -20)',
],
'positive column too large' => [
'#VALUE!',
'=DROP(B3:D11, , 20)',
],
'negative column too large' => [
'#VALUE!',
'=DROP(B3:D11, , -20)',
],
'row okay column too large' => [
'#VALUE!',
'=DROP(B3:D11, -1, 20)',
],
'zero row' => [
[
['a', 'b', 'c'],
['d', 'e', 'f'],
['g', 'h', 'i'],
['j', 'k', 'l'],
['m', 'n', 'o'],
['p', 'q', 'r'],
['s', 't', 'u'],
['v', 'w', 'x'],
['y', 'z', '#'],
],
'=DROP(B3:D11, 0)',
],
'zero column' => [
[
['d', 'e', 'f'],
['g', 'h', 'i'],
['j', 'k', 'l'],
['m', 'n', 'o'],
['p', 'q', 'r'],
['s', 't', 'u'],
['v', 'w', 'x'],
['y', 'z', '#'],
],
'=DROP(B3:D11, 1, 0)',
],
'single cell' => [
'#VALUE!',
'=DROP(B3, 1)',
],
'inline array rather than range' => [
[
[4],
[6],
],
'=DROP({1,2;3,4;5,6}, 1, 1)',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/HLOOKUP.php | tests/data/Calculation/LookupRef/HLOOKUP.php | <?php
declare(strict_types=1);
/** @return array<int, array<int, float|int|string>> */
function orderGrid(): array
{
return [
['Order ID', 10247, 10249, 10250, 10251, 10252, 10253],
['Unit Price', 14.00, 18.60, 7.70, 16.80, 16.80, 64.80],
['Quantity', 12, 9, 10, 6, 20, 40],
];
}
/** @return array<int, array<int, int|string>> */
function partsGrid(): array
{
return [
['Axles', 'Bearings', 'Bolts'],
[4, 4, 9],
[5, 7, 10],
[6, 8, 11],
];
}
return [
[
16.80,
10251,
orderGrid(),
2,
false,
],
[
6.0,
10251,
orderGrid(),
3,
false,
],
[
'#N/A',
10248,
orderGrid(),
2,
false,
],
[
14.0,
10248,
orderGrid(),
2,
true,
],
[
4,
'Axles',
partsGrid(),
2,
true,
],
[
7,
'Bearings',
partsGrid(),
3,
false,
],
[
5,
'B',
partsGrid(),
3,
true,
],
[
5,
'B',
partsGrid(),
3,
null,
],
[
11,
'Bolts',
partsGrid(),
4,
],
[
'c',
3,
[
[1, 2, 3],
['a', 'b', 'c'],
['d', 'e', 'f'],
],
2,
true,
],
[
3,
3,
[
[1, 2, 3],
],
1,
true,
],
[
5,
'x',
[
['Selection column', '0', '0', '0', '0', 'x', 'x', 'x', 'x', 'x'],
['Value to retrieve', 1, 2, 3, 4, 5, 6, 7, 8, 9],
],
2,
false,
],
[
2,
'B',
[
['Selection column', 'C', 'B', 'A'],
['Value to retrieve', 3, 2, 1],
],
2,
false,
],
[
'#VALUE!',
'B',
[
['Selection column', 'C', 'B', 'A'],
['Value to retrieve', 3, 2, 1],
],
'Nan',
false,
],
[
'#N/A',
'B',
[
'Selection column',
'Value to retrieve',
],
2,
false,
],
[
'#REF!',
'Selection column',
[
'Selection column',
'Value to retrieve',
],
5,
false,
],
[
'Selection column',
'Selection column',
[
'Selection column',
'Value to retrieve',
],
1,
false,
],
[
0.61,
'Ed',
[
[null, 'Ann', 'Cara', 'Colin', 'Ed', 'Frank'],
['Math', 0.58, 0.90, 0.67, 0.76, 0.80],
['French', 0.61, 0.71, 0.59, 0.59, 0.76],
['Physics', 0.75, 0.45, 0.39, 0.52, 0.69],
['Bioogy', 0.39, 0.55, 0.77, 0.61, 0.45],
],
5,
false,
],
[
'Normal Weight',
23.5,
[
[null, 'Min', 0.0, 18.5, 25.0, 30.0],
['BMI', 'Max', 18.4, 24.9, 29.9, null],
[null, 'Body Type', 'Underweight', 'Normal Weight', 'Overweight', 'Obese'],
],
3,
true,
],
'issue2934' => [
'Red',
102,
[
[null, 102],
[null, 'Red'],
],
2,
false,
],
'issue 3561' => [
8,
6,
[
[1, 6, 11],
[2, 7, 12],
[3, 8, 13],
[4, 9, 14],
[5, 10, 15],
],
[[3], [4], [3]],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/HYPERLINK.php | tests/data/Calculation/LookupRef/HYPERLINK.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
['https://phpspreadsheet.readthedocs.io/en/latest/', 'https://phpspreadsheet.readthedocs.io/en/latest/'],
'https://phpspreadsheet.readthedocs.io/en/latest/',
null,
],
[
['https://phpspreadsheet.readthedocs.io/en/latest/', 'Read the Docs'],
'https://phpspreadsheet.readthedocs.io/en/latest/',
'Read the Docs',
],
[
'exception',
null,
null,
],
[
ExcelError::REF(),
'',
null,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/INDIRECT.php | tests/data/Calculation/LookupRef/INDIRECT.php | <?php
declare(strict_types=1);
return [
'cell range absolute' => [600, '$A$1:$A$3'],
'cell range on different sheet' => [30, 'OtherSheet!A1:A2'],
'cell range on different sheet absolute' => [60, 'OtherSheet!$A$1:$A$3'],
'cell range relative' => [500, 'A2:A3'],
'global name qualified with correct sheet' => [90, 'OtherSheet!newnr'],
'global name qualified with incorrect sheet' => [90, 'ThisSheet!newnr'],
'global name qualified with non-existent sheet' => ['#REF!', 'UnknownSheet!newnr'],
'invalid address' => ['#REF!', 'InvalidCellAddress'],
'invalid address as first part of range' => ['#REF!', 'Invalid:A2'],
'invalid address as second part of range' => ['#REF!', 'A2:Invalid'],
'local name out of scope' => ['#REF!', 'localname'],
'named range' => [90, 'newnr'],
'named range a1 arg ignored' => [90, 'newnr', false],
'named range case-insensitive' => [90, 'newNr'],
'null address' => ['#REF!', null],
'omit a1 argument' => [900, 'A2:A4'],
'qualified name correct sheet even out of scope' => [9, 'OtherSheet!localname'],
'qualified name incorrect sheet' => ['#REF!', 'ThisSheet!localname'],
'qualified name non-existent sheet' => ['#REF!', 'OtherSheetx!localname'],
'r1c1 cell on different sheet' => [40, 'OtherSheet!R4C1', false],
'r1c1 format a1 as string not permitted' => ['#VALUE!', 'R2C1', '0'],
'r1c1 format a1 is bool' => [200, 'R2C1', false],
'r1c1 format a1 is int' => [200, 'R2C1', 0],
'r1c1 range' => [600, 'R1C1:R3C1', false],
'r1c1 range on different sheet' => [90, 'OtherSheet!R4C1:R5C1', false],
'single cell absolute' => [200, '$A$2'],
'single cell relative' => [100, 'A1'],
'single cell on different sheet absolute' => [30, 'OtherSheet!$A$3'],
'single cell on different sheet relative' => [10, 'OtherSheet!A1'],
'supply a1 argument as bool' => [900, 'A2:A4', true],
'supply a1 argument as int' => [900, 'A2:A4', 1],
'supply a1 argument as float' => [900, 'A2:A4', 7.3],
'supply a1 argument as string not permitted' => ['#VALUE!', 'A2:A4', '1'],
'row range' => [600, '1:3'],
'column range' => [1500, 'A:C'],
'row range on different sheet' => [66, 'OtherSheet!1:3'],
'column range on different sheet' => [165, 'OtherSheet!A:C'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/ROWS.php | tests/data/Calculation/LookupRef/ROWS.php | <?php
declare(strict_types=1);
return [
[
1,
null,
],
[
1,
'',
],
[
'#VALUE!',
'foo',
],
[
0,
[],
],
[
1,
[1],
],
[
2,
[1, 1],
],
[
1,
[[1, 1]],
],
[
2,
['a' => [1, 1]],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/TRANSPOSE.php | tests/data/Calculation/LookupRef/TRANSPOSE.php | <?php
declare(strict_types=1);
return [
[
[
['Jan', 'Feb', 'Mar', 'Apr'],
[100, 200, 150, 300],
],
[
['Jan', 100],
['Feb', 200],
['Mar', 150],
['Apr', 300],
],
],
[
[
['a', 'aa'],
['b', 'ab'],
['c', 'ac'],
['d', 'ad'],
],
[
['a', 'b', 'c', 'd'],
['aa', 'ab', 'ac', 'ad'],
],
],
[
[[3.14]],
3.14,
],
'single row' => [
[[1], [2], [3], [4]],
[[1, 2, 3, 4]],
],
'single row 1-D' => [
[[1], [2], [3], [4]],
[1, 2, 3, 4],
],
'single column' => [
[[1, 2, 3, 4]],
[[1], [2], [3], [4]],
],
'single cell' => [
[[1]],
[[1]],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/CHOOSEROWS.php | tests/data/Calculation/LookupRef/CHOOSEROWS.php | <?php
declare(strict_types=1);
return [
'select last row' => [
[
['y', 'z', '#'],
],
'=CHOOSEROWS(B3:D11, -1)',
],
'fractional row' => [
[
['y', 'z', '#'],
],
'=CHOOSEROWS(B3:D11, -1.8)',
],
'numeric string row' => [
[
['y', 'z', '#'],
],
'=CHOOSEROWS(B3:D11, " -1.8 ")',
],
'select 1 row' => [
[
['d', 'e', 'f'],
],
'=CHOOSEROWS(B3:D11, 2)',
],
'multiple rows including duplicates' => [
[
['d', 'e', 'f'],
['a', 'b', 'c'],
['d', 'e', 'f'],
],
'=CHOOSEROWS(B3:D11, 2, 1, 2)',
],
'multiple rows mixed +/- mixed scalar/matrix' => [
[
['d', 'e', 'f'],
['s', 't', 'u'],
['d', 'e', 'f'],
],
'=CHOOSEROWS(B3:D11, 2, {-3; 2})',
],
'reverse Rows' => [
[
['y', 'z', '#'],
['v', 'w', 'x'],
['s', 't', 'u'],
['p', 'q', 'r'],
['m', 'n', 'o'],
['j', 'k', 'l'],
['g', 'h', 'i'],
['d', 'e', 'f'],
['a', 'b', 'c'],
],
'=CHOOSEROWS(B3:D11, SEQUENCE(ROWS(B3:D11),,ROWS(B3:D11),-1))',
],
'inline array' => [
[
['g', 'h', 'i'],
['d', 'e', 'f'],
],
'=CHOOSEROWS(B3:D11, {3;2})',
],
'inline array with negative numbers' => [
[
['v', 'w', 'x'],
['y', 'z', '#'],
],
'=CHOOSEROWS(B3:D11, {-2;-1})',
],
'named range' => [
[
['v', 'w', 'x'],
['y', 'z', '#'],
],
'=CHOOSEROWS(definedname, {-2;-1})',
],
'only 1 argument' => [
'exception',
'=CHOOSEROWS(B3:D11)',
],
'non-numeric row' => [
'#VALUE!',
'=CHOOSEROWS(B3:D11, "x")',
],
'positive row too large' => [
'#VALUE!',
'=CHOOSEROWS(B3:D11, 10)',
],
'negative row too large' => [
'#VALUE!',
'=CHOOSEROWS(B3:D11, 1, -10)',
],
'zero row' => [
'#VALUE!',
'=CHOOSEROWS(B3:D11, 0)',
],
'single cell' => [
[
['a'],
],
'=CHOOSEROWS(B3, 1)',
],
'inline array rather than range' => [
[
[3, 4],
[1, 2],
[1, 2],
],
'=CHOOSEROWS({1,2;3,4;5,6}, " 2.4 ", 1, 1)',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/ADDRESS.php | tests/data/Calculation/LookupRef/ADDRESS.php | <?php
declare(strict_types=1);
return [
[
'$C$2',
2,
3,
],
[
'C$2',
2,
3,
2,
],
[
'$C2',
2,
3,
3,
],
[
'R2C[3]',
2,
3,
2,
false,
],
[
'R[2]C3',
2,
3,
3,
false,
],
[
"'[Book1]Sheet1'!R2C3",
2,
3,
1,
false,
'[Book1]Sheet1',
],
[
"'EXCEL SHEET'!R2C3",
2,
3,
null,
false,
'EXCEL SHEET',
],
'0 instead of bool for 4th arg' => [
"'EXCEL SHEET'!R2C3",
2,
3,
null,
0,
'EXCEL SHEET',
],
'1 instead of bool for 4th arg' => [
"'EXCEL SHEET'!\$C\$2",
2,
3,
null,
1,
'EXCEL SHEET',
],
[
"'EXCEL SHEET'!\$C\$2",
2,
3,
1,
null,
'EXCEL SHEET',
],
[
'#VALUE!',
-2,
-2,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/FORMULATEXT.php | tests/data/Calculation/LookupRef/FORMULATEXT.php | <?php
declare(strict_types=1);
return [
[
'#N/A',
2,
],
[
'="ABC"',
'="ABC"',
],
[
'=A1',
'=A1',
],
[
'=\'Worksheet1\'!A1',
'=\'Worksheet1\'!A1',
],
[
'=\'Works heet1\'!A1',
'=\'Works heet1\'!A1',
],
[
'="HELLO WORLD"',
'="HELLO WORLD"',
],
[
'=\'Work!sheet1\'!A5',
'=\'Work!sheet1\'!A5',
],
[
'#N/A',
'A1',
],
[
'#N/A',
null,
],
[
'=SUM(B1,B2,B3)',
'=SUM(B1,B2,B3)',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/CHOOSE.php | tests/data/Calculation/LookupRef/CHOOSE.php | <?php
declare(strict_types=1);
return [
[
'brown',
4, 'red', 'blue', 'green', 'brown',
],
[
'blue',
2, 'red', 'blue', 'green', 'brown',
],
[
'green',
3, 'red', 'blue', 'green', 'brown',
],
[
'red',
1, 'red', 'blue', 'green', 'brown',
],
[
'#VALUE!',
5, 'red', 'blue', 'green', 'brown',
],
[
'#VALUE!',
0, 'red', 'blue', 'green', 'brown',
],
[
'#VALUE!',
'NaN', 'red', 'blue', 'green', 'brown',
],
[
['blue', 'purple'],
3, ['red', 'orange'], ['yellow', 'green'], ['blue', 'purple'],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/VLOOKUP.php | tests/data/Calculation/LookupRef/VLOOKUP.php | <?php
declare(strict_types=1);
/** @return array<int, array<int, float|string>> */
function densityGrid(): array
{
return [
['Density', 'Viscosity', 'Temperature'],
[0.457, 3.55, 500],
[0.525, 3.25, 400],
[0.616, 2.93, 300],
[0.675, 2.75, 250],
[0.746, 2.57, 200],
[0.835, 2.38, 150],
[0.946, 2.17, 100],
[1.090, 1.95, 50],
[1.290, 1.71, 0],
];
}
return [
[
'#N/A',
1,
densityGrid(),
2,
false,
],
[
'#REF!',
1,
'HELLO WORLD',
2,
false,
],
[
100,
1,
densityGrid(),
3,
true,
],
[
'#N/A',
0.70,
densityGrid(),
3,
false,
],
[
'#N/A',
0.100,
densityGrid(),
2,
true,
],
[
1.71,
2,
densityGrid(),
2,
true,
],
[
5,
'x',
[
[
'Selection column',
'Value to retrieve',
],
['0', 1],
['0', 2],
['0', 3],
['0', 4],
['x', 5],
['x', 6],
['x', 7],
['x', 8],
['x', 9],
],
2,
false,
],
[
'#N/A',
'10y2',
[
['5y-1', 2.0],
['10y1', 7.0],
['10y2', 10.0],
],
2.0,
],
[
'#VALUE!',
'10y2',
[
['5y-1', 2.0],
['10y1', 7.0],
['10y2', 10.0],
],
-5,
],
[
'#REF!',
'10y2',
[
],
2.0,
],
[
'#REF!',
'10y2',
[
[2.0],
[7.0],
[10.0],
],
2.0,
],
[
3.50,
'Cornflakes',
[
['Item Description', 'Price'],
['Tinned Tomatoes', 0.90],
['Tinned Tuna', 1.50],
['Cornflakes', 3.50],
['Shortcake Biscuits', 1.00],
['Toothpaste', 4.10],
['Tinned Baked Beans', 0.99],
['White Sliced Bread', 0.80],
],
2,
false,
],
[
'E',
0.52,
[
['Lower', 'Upper', 'Grade'],
[0.00, 0.44, 'F'],
[0.45, 0.54, 'E'],
[0.55, 0.64, 'D'],
[0.65, 0.74, 'C'],
[0.75, 0.84, 'B'],
[0.85, 1.00, 'A'],
],
3,
true,
],
[
'E',
0.52,
[
['Lower', 'Upper', 'Grade'],
[0.00, 0.44, 'F'],
[0.45, 0.54, 'E'],
[0.55, 0.64, 'D'],
[0.65, 0.74, 'C'],
[0.75, 0.84, 'B'],
[0.85, 1.00, 'A'],
],
3,
null,
],
'issue2934' => [
'Red',
102,
[
[null, null],
[102, 'Red'],
],
2,
false,
],
'string supplied as index' => [
'#VALUE!',
102,
[
[null, null],
[102, 'Red'],
],
'xyz',
false,
],
'num error propagated' => [
'#NUM!',
102,
[
[null, null],
[102, 'Red'],
],
'=SQRT(-1)',
false,
],
'issue 3561' => [
7,
6,
[
[1, 2, 3, 4, 5],
[6, 7, 8, 9, 10],
[11, 12, 13, 14, 15],
],
[[2], [3], [2]],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/COLUMNSonSpreadsheet.php | tests/data/Calculation/LookupRef/COLUMNSonSpreadsheet.php | <?php
declare(strict_types=1);
return [
'global $e$2-$e$6' => [1, 'namedrangex'],
'global $f$2:$h$2' => [3, 'namedrangey'],
'global $f$4:$h$4' => [3, 'namedrange3'],
'local in scope $f$5:$i$5' => [4, 'namedrange5'],
'local out of scope' => ['#NAME?', 'localname'],
'non-existent sheet' => [10, 'UnknownSheet!B2:K6'],
'not enough arguments' => ['exception', 'omitted'],
'other existing sheet' => [6, 'OtherSheet!B1:G1'],
'qualified in scope $f$5:$i$5' => [4, 'ThisSheet!namedrange5'],
'single cell absolute' => [1, '$C$15'],
'single cell relative' => [1, 'C7'],
'unknown name' => ['#NAME?', 'namedrange2'],
'unknown name as first part of range' => ['#NAME?', 'Invalid:A2'],
'unknown name as second part of range' => ['#NAME?', 'A2:Invalid'],
'qualified out of scope $f$6:$h$6' => [3, 'OtherSheet!localname'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/OFFSET.php | tests/data/Calculation/LookupRef/OFFSET.php | <?php
declare(strict_types=1);
return [
[
'#VALUE!',
null,
],
[
'#REF!',
'B5',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/LookupRef/COLUMNonSpreadsheet.php | tests/data/Calculation/LookupRef/COLUMNonSpreadsheet.php | <?php
declare(strict_types=1);
return [
'current column' => [2, 'omitted'],
'global name $E$2:$E$6' => [5, 'namedrangex'],
'global name $F$2:$H$2' => [6, 'namedrange3'],
'global name $F$4:$H$4' => [6, 'namedrangey'],
'out of scope name' => ['#NAME?', 'localname'],
'qualified cell existing sheet' => [1, 'OtherSheet!A1'],
'qualified cell non-existent sheet' => [1, 'UnknownSheet!A1'],
'single cell absolute' => [3, '$C$15'],
'single cell relative' => [3, 'C7'],
'unknown name' => ['#NAME?', 'namedrange2'],
'unknown name as first part of range' => ['#NAME?', 'Invalid:A2'],
'unknown name as second part of range' => ['#NAME?', 'A2:Invalid'],
'qualified name' => [6, 'OtherSheet!localname'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/STDEV_ODS.php | tests/data/Calculation/Statistical/STDEV_ODS.php | <?php
declare(strict_types=1);
return [
[
27.463915719843,
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
],
[
'#DIV/0!',
['A', 'B', 'C'],
],
[
0.7071067811865476,
[true, false],
],
[
0.577350269190,
[true, false, 1],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/COUNTA.php | tests/data/Calculation/Statistical/COUNTA.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Shared\Date;
return [
[
5,
[-1, 0, 1, 2, 3],
],
'null treated differently references vs. direct' => [
[11, 14],
[
// The index simulates a cell value
'0.1.A' => Date::stringToExcel('1900-02-01'),
'0.2.A' => 0,
'0.3.A' => null,
'0.4.A' => 1.2,
'0.5.A' => '',
'0.6.A' => 2.4,
'0.7.A' => null,
'0.8.A' => '',
'0.9.A' => 3.6,
'0.10.A' => null,
'0.11.A' => '',
'0.12.A' => 4.8,
'0.13.A' => 'Not a numeric',
'0.14.A' => 6,
],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/MINA.php | tests/data/Calculation/Statistical/MINA.php | <?php
declare(strict_types=1);
return [
[
2,
10, 7, 9, 27, 2,
],
[
-7,
10, '-9', -7, '17', 2,
],
[
0,
10, 7, 9, '17', 2,
],
[
1,
10, true, 9, 2,
],
[
0,
null, true, 2, false,
],
[
0,
null, 'STRING', '', 'xl95',
],
[
0,
null, null, null, null,
],
'error among arguments' => [
'#DIV/0!',
1, 3, '=5/0', -2,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/WEIBULL.php | tests/data/Calculation/Statistical/WEIBULL.php | <?php
declare(strict_types=1);
return [
[
0.929581390070,
105, 20, 100, true,
],
[
0.035588864025,
105, 20, 100, false,
],
'too few arguments' => [
'exception',
105, 20, 100,
],
[
1.10363832351433,
1, 3, 1, false,
],
[
0.985212776817482,
2, 5, 1.5, true,
],
[
'#VALUE!',
'NaN', 5, 1.5, true,
],
[
'#VALUE!',
2, 'NaN', 1.5, true,
],
[
'#VALUE!',
2, 5, 'NaN', true,
],
[
'#VALUE!',
2, 5, 1.5, 'NaN',
],
[
'#NUM!',
-2, 5, 1.5, true,
],
[
'#NUM!',
-2, 0, 1.5, true,
],
[
'#NUM!',
-2, 5, 0, true,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/TDISTRT.php | tests/data/Calculation/Statistical/TDISTRT.php | <?php
declare(strict_types=1);
return [
[
0.027322464988,
1.959999998, 60,
],
[
0.170446566151,
1, 10,
],
[
0.028237990213,
2, 25,
],
'test 1 derived from Perl suite 1-tail' => [
0.0041301,
6.251, 3,
],
'issue 4167' => [
0.15865168744175628,
1.8373862310371, 1,
],
[
'#VALUE!',
'NaN', 10,
],
[
'#VALUE!',
1, 'NaN',
],
[
'#NUM!',
-1, 10,
],
[
'#NUM!',
1, 0,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/AVERAGE.php | tests/data/Calculation/Statistical/AVERAGE.php | <?php
declare(strict_types=1);
return [
[
11,
[10, 7, 9, 27, 2],
],
[
10,
[10, 7, 9, 27, 2, 5],
],
[
19,
[10, 15, 32],
],
[
8.85,
[10.5, 7.2],
],
[
19.2,
[7.2, 5.4, 45],
],
[
46.24,
[10.5, 7.2, 200, 5.4, 8.1],
],
[
[4.025, '#VALUE!'],
[
// The index simulates a cell value
// Numbers and Booleans are both counted
'0.1.A' => 1,
'0.2.A' => '2',
'0.3.A' => 3.4,
'0.4.A' => true,
'0.5.A' => 5,
'0.6.A' => null,
'0.7.A' => 6.7,
'0.8.A' => 'STRING',
'0.9.A' => '',
],
],
[
[4.025, 3.183333333333],
[1, '2', 3.4, true, 5, 6.7],
],
[
// When non-numeric strings are passed directly, then a #VALUE! error is raised
[4.025, '#VALUE!'],
[1, '2', 3.4, true, 5, null, 6.7, 'STRING', ''],
],
'no arguments' => [
['#DIV/0!', 'exception'],
[],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/PERMUT.php | tests/data/Calculation/Statistical/PERMUT.php | <?php
declare(strict_types=1);
return [
[
5,
5, 1,
],
[
20,
5, 2,
],
[
60,
5, 3,
],
[
120,
5, 4,
],
[
120,
5, 5,
],
[
970200,
100, 3,
],
[
6,
3, 2,
],
[
720,
6, 6,
],
[
5040,
7, 6,
],
[
151200,
10, 6,
],
[
10068347520,
49, 6,
],
[
'#NUM!',
2, 3,
],
[
'#NUM!',
1, 2,
],
[
'#VALUE!',
49, 'NaN',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/STDEVP.php | tests/data/Calculation/Statistical/STDEVP.php | <?php
declare(strict_types=1);
return [
[
26.0545581424825,
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
],
[
'#DIV/0!',
['A', 'B', 'C'],
],
[
'#DIV/0!',
[true, false],
],
[
0.0,
[true, false, 1],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/PERCENTRANK.php | tests/data/Calculation/Statistical/PERCENTRANK.php | <?php
declare(strict_types=1);
return [
[
0.667,
[1, 2, 3, 4],
3,
],
[
0.67,
[1, 2, 3, 4],
3,
2,
],
[
0.83,
[1, 2, 3, 4],
3.5,
2,
],
[
0.758,
[7, 8, 9, 20],
12,
],
[
0.2222,
[10.5, 7.2, 200, 5.4, 8.1],
7,
4,
],
[
0.333,
[13, 12, 11, 8, 4, 3, 2, 1, 1, 1],
2,
],
[
0.556,
[13, 12, 11, 8, 4, 3, 2, 1, 1, 1],
4,
],
[
0.667,
[13, 12, 11, 8, 4, 3, 2, 1, 1, 1],
8,
],
[
0.583,
[13, 12, 11, 8, 4, 3, 2, 1, 1, 1],
5,
],
[
0.67,
[1, 'Deux', 2, 'Uno', 3, 4],
3,
2,
],
[
'#VALUE!',
['A', 'B', 'C', 'D'],
'E',
],
[
'#N/A',
['A', 'B', 'C', 'D'],
3,
],
[
'#N/A',
[1, 2, 3, 4],
5,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/BETAINV.php | tests/data/Calculation/Statistical/BETAINV.php | <?php
declare(strict_types=1);
return [
[
1.862243320728,
0.52, 3, 4, 1, 3,
],
[
2.164759759129,
0.3, 7.5, 9, 1, 4,
],
[
2.164759759129,
0.3, 7.5, 9, 4, 1,
],
[
7.761240188783,
0.75, 8, 9, 5, 10,
],
[
2.0,
0.685470581055, 8, 10, 1, 3,
],
[
0.303225844664,
0.2, 4, 5, 0, 1,
],
[
0.303225844664,
0.2, 4, 5, null, null,
],
[
'#VALUE!',
'NAN', 4, 5, 0, 1,
],
[
'#VALUE!',
0.2, 'NAN', 5, 0, 1,
],
[
'#VALUE!',
0.2, 4, 'NAN', 0, 1,
],
[
'#VALUE!',
0.2, 4, 5, 'NAN', 1,
],
[
'#VALUE!',
0.2, 4, 5, 0, 'NAN',
],
'alpha < 0' => [
'#NUM!',
0.2, -4, 5, 0, 1,
],
'alpha = 0' => [
'#NUM!',
0.2, 0, 5, 0, 1,
],
'beta < 0' => [
'#NUM!',
0.2, 4, -5, 0, 1,
],
'beta = 0' => [
'#NUM!',
0.2, 4, 0, 0, 1,
],
'Probability < 0' => [
'#NUM!',
-0.5, 4, 5, 1, 3,
],
'Probability = 0' => [
'#NUM!',
0.0, 4, 5, 1, 3,
],
'Probability > 1' => [
'#NUM!',
1.5, 4, 5, 1, 3,
],
'Min = Max' => [
'#NUM!',
1, 4, 5, 1, 1,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/tDotDistFalse.php | tests/data/Calculation/Statistical/tDotDistFalse.php | <?php
declare(strict_types=1);
return [
[
0.246526054,
0.9726775350120389,
60,
],
'negative value' => [
0.05984790643563141,
-1.959999998, 60,
],
[
0.23036198922913867,
1, 10,
],
[
0.05736069661390933,
2, 25,
],
'test 2 derived from Perl suite 2-tail' => [
0.0018685887727939731,
6.251, 3,
],
'issue 4167' => [
0.07274011592342915,
1.8373862310371, 1,
],
[
0.25270396336615836,
0.509525, 1,
],
[
0.29593300757148816,
-0.7, 8,
],
[
'#VALUE!',
'NaN', 10,
],
[
'#VALUE!',
1, 'NaN',
],
[
0.23036198922913867,
-1, 10,
],
[
'#NUM!',
1, 0,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/POISSON.php | tests/data/Calculation/Statistical/POISSON.php | <?php
declare(strict_types=1);
return [
[
0.12465201948308113,
2, 5, true,
],
[
0.08422433748856833,
2, 5, false,
],
[
0.05191746860849132,
20, 25, false,
],
[
0.24241419769010333,
35, 40, true,
],
[
'#VALUE!',
'Nan', 40, true,
],
[
'#VALUE!',
35, 'Nan', true,
],
[
'#VALUE!',
35, 40, 'Nan',
],
'Value < 0' => [
'#NUM!',
-35, 40, true,
],
'Mean < 0' => [
'#NUM!',
35, -40, true,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/GAMMALN.php | tests/data/Calculation/Statistical/GAMMALN.php | <?php
declare(strict_types=1);
return [
[
2.453736570842,
4.5,
],
[
1.791759469228,
4,
],
[
'#VALUE!',
'NAN',
],
'Value < 0' => [
'#NUM!',
-4.5,
],
'Value = 0' => [
'#NUM!',
0.0,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/SKEW.php | tests/data/Calculation/Statistical/SKEW.php | <?php
declare(strict_types=1);
return [
[
0.359543071407,
[3, 4, 5, 2, 3, 4, 5, 6, 4, 7],
],
[
0.863378312234,
[1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 6, 7, 8],
],
[
'#VALUE!',
[1, 1, 2, 2, 2, 2, 3, 'NaN', 3, 4, 4, 5, 6, 7, 8],
],
[
'#DIV/0!',
[1, 1],
],
[
'#DIV/0!',
[1, 1],
],
[
'#DIV/0!',
['A', 'B', 'C', 'D', 'E'],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/SMALL.php | tests/data/Calculation/Statistical/SMALL.php | <?php
declare(strict_types=1);
return [
[
3,
[1, 4, 8, 3, 7, 12, 54, 8, 23],
2,
],
[
4,
[3, 4, 5, 2, 3, 4, 6, 4, 7],
4,
],
[
6,
['3', 4, 5, '2', '3', 4, 5, 6, 4, 7],
6,
],
[
'#VALUE!',
[3, 4, 5, 2, 3, 4, 5, 6, 4, 7],
'NAN',
],
[
'#NUM!',
[3, 4, 5, 2, 3, 4, 5, 6, 4, 7],
-1,
],
[
'#NUM!',
[],
1,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/TREND.php | tests/data/Calculation/Statistical/TREND.php | <?php
declare(strict_types=1);
return [
[
[
[133953.33333333334],
[134971.51515151517],
[135989.69696969696],
[137007.87878787878],
[138026.0606060606],
[139044.24242424243],
[140062.42424242425],
[141080.60606060608],
[142098.78787878787],
[143116.9696969697],
[144135.15151515152],
[145153.33333333334],
],
[133890, 135000, 135790, 137300, 138130, 139100, 139900, 141120, 141890, 143230, 144000, 145290],
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
],
[
[
[146171.51515151517],
[147189.69696969696],
[148207.87878787878],
[149226.0606060606],
[150244.24242424243],
],
[133890, 135000, 135790, 137300, 138130, 139100, 139900, 141120, 141890, 143230, 144000, 145290],
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
[13, 14, 15, 16, 17],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/LOGEST.php | tests/data/Calculation/Statistical/LOGEST.php | <?php
declare(strict_types=1);
return [
[
[1.000174230092, 1.0],
[1, 2, 3, 4, 5],
[1, 10, 100, 1000, 10000],
false,
false,
],
[
[1.000091183030, 2.127357620703],
[1, 2, 3, 4, 5],
[1, 10, 100, 1000, 10000],
true,
false,
],
[
[1.463275628116, 495.304770158727],
[33100, 47300, 69000, 102000, 150000, 220000],
[11, 12, 13, 14, 15, 16],
true,
false,
],
[
[1.482939830687, 2.257475168225],
[2, 3, 6, 8, 12, 15, 25, 34, 50],
[0, 1, 2, 3, 4, 5, 6, 7, 8],
true,
false,
],
[
[1.1743674215053, 1.0],
[3, 10, 3, 6, 8, 12, 1, 4, 9, 14],
[8, 2, 11, 6, 5, 4, 12, 9, 6, 1],
false,
false,
],
[
[0.8135120728565, 20.671878197178],
[3, 10, 3, 6, 8, 12, 1, 4, 9, 14],
[8, 2, 11, 6, 5, 4, 12, 9, 6, 1],
true,
false,
],
// [
// [
// [1.174367421505266, 1.0],
// [0.0672620306083, Functions::NA()],
// [0.3881799938732, 1.545563794251],
// [5.7102087376569, 9],
// [13.6403607201119, 21.498906978904],
// ],
// [3, 10, 3, 6, 8, 12, 1, 4, 9, 14],
// [8, 2, 11, 6, 5, 4, 12, 9, 6, 1],
// false,
// true,
// ],
// [
// [
// [0.8135120728565, 20.671878197178],
// [0.0313021171611, 0.227452478657],
// [0.8445875527654, 0.340603858743],
// [43.4759283593386, 8],
// [5.0436854288511, 0.928087908723],
// ],
// [3, 10, 3, 6, 8, 12, 1, 4, 9, 14],
// [8, 2, 11, 6, 5, 4, 12, 9, 6, 1],
// true,
// true,
// ],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/STEYX.php | tests/data/Calculation/Statistical/STEYX.php | <?php
declare(strict_types=1);
return [
[
3.305718950210,
[2, 3, 9, 1, 8, 7, 5],
[6, 5, 11, 7, 5, 4, 4],
],
[
1.201186346682,
[3, 7.9, 8, 9.2, 12, 10.5, 15, 15.5, 17],
[1, 2, 3, 4, 4.5, 5, 6, 7, 8],
],
[
'#N/A',
[],
[],
],
[
'#DIV/0!',
[2],
[1],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/CHIDISTLeftTail.php | tests/data/Calculation/Statistical/CHIDISTLeftTail.php | <?php
declare(strict_types=1);
return [
[
0.520499877813,
0.5, 1, true,
],
[
0.207553748710,
2, 3, false,
],
[
0.111565080074,
3, 2, false,
],
[
0.776869839852,
3, 2, true,
],
[
0.039646370521,
3, 9, false,
],
[
0.035705027315,
3, 9, true,
],
[
0.103349469094,
7.5, 8, false,
],
[
0.516232618446,
7.5, 8, true,
],
[
0.020666985354,
8, 3, false,
],
[
0.953988294311,
8, 3, true,
],
[
'#VALUE!',
'NaN', 3, true,
],
[
'#VALUE!',
2, 'NaN', true,
],
[
'#VALUE!',
2, 3, 'NaN',
],
'Value < 0' => [
'#NUM!',
-8, 3, true,
],
'Degrees < 1' => [
'#NUM!',
8, 0, true,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/EXPONDIST.php | tests/data/Calculation/Statistical/EXPONDIST.php | <?php
declare(strict_types=1);
return [
[
1.353352832366,
0.2, 10, false,
],
[
0.864664716763,
0.2, 10, true,
],
[
0.606530659713,
0.5, 1, false,
],
[
0.393469340287,
0.5, 1, true,
],
[
'#VALUE!',
'NAN', 1, true,
],
[
'#VALUE!',
0.5, 'NAN', true,
],
[
'#VALUE!',
0.5, 1, 'NAN',
],
[
'#NUM!',
-0.5, 1, true,
],
[
'#NUM!',
0.5, -1, true,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/VARPA_ODS.php | tests/data/Calculation/Statistical/VARPA_ODS.php | <?php
declare(strict_types=1);
return [
[
678.84,
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
],
[
0.25,
[true, false],
],
[
0.222222222222,
[true, false, 1],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/INTERCEPT.php | tests/data/Calculation/Statistical/INTERCEPT.php | <?php
declare(strict_types=1);
return [
[
25.0,
[5, 10, 15, 20],
[12, 9, 6, 3],
],
[
-9.0,
[1, 2, 3, 4],
[10, 11, 12, 13],
],
[
0.0,
[10, 20, 30],
[10, 20, 30],
],
[
0.048387096774,
[2, 3, 9, 1, 8],
[6, 5, 11, 7, 5],
],
[
2.4,
[6, 9, 17, 20, 20, 27],
[1, 2, 3, 4, 5, 6],
],
[
'#N/A',
[1, 2, 3],
[4, 5],
],
[
'#DIV/0!',
[1, 2, 3],
[4, null, null],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/LARGE.php | tests/data/Calculation/Statistical/LARGE.php | <?php
declare(strict_types=1);
return [
[
5,
[3, 4, 5, 2, 3, 4, 5, 6, 4, 7],
3,
],
[
4,
[3, 4, 5, 2, 3, 4, 5, 6, 4, 7],
7,
],
[
2,
[3, 4, '5', 2, 3, 4, '5', '6', 4, '7'],
6,
],
[
'#VALUE!',
[3, 4, 5, 2, 3, 4, 5, 6, 4, 7],
'NAN',
],
[
'#NUM!',
[3, 4, 5, 2, 3, 4, 5, 6, 4, 7],
-1,
],
[
'#NUM!',
[],
1,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/MINIFS.php | tests/data/Calculation/Statistical/MINIFS.php | <?php
declare(strict_types=1);
return [
'no argument' => [
'exception',
],
[
1,
[1, 2, 3],
['Y', 'Y', 'N'],
'=Y',
['H', 'H', 'H'],
'=H',
],
[
1,
[1, 2, 3],
['Y', 'Y', 'N'],
'=Y',
],
[
2,
[1, 2, 3],
['A', 'B', 'C'],
'=B',
['C', 'B', 'A'],
'=B',
],
[
125000,
[223000, 125000, 456000, 322000, 340000, 198000, 310000, 250000, 460000, 261000, 389000, 305000],
[1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4],
1,
],
[
261000,
[223000, 125000, 456000, 322000, 340000, 198000, 310000, 250000, 460000, 261000, 389000, 305000],
[1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4],
'>2',
['Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol'],
'Jeff',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/VARPA.php | tests/data/Calculation/Statistical/VARPA.php | <?php
declare(strict_types=1);
return [
[
678.84,
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
],
[
0.25,
[true, false],
],
[
0.222222222222,
[true, false, 1],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/RSQ.php | tests/data/Calculation/Statistical/RSQ.php | <?php
declare(strict_types=1);
return [
[
0.057950191571,
[2, 3, 9, 1, 8, 7, 5],
[6, 5, 11, 7, 5, 4, 4],
],
[
0.711666290487,
[2, 7, 8, 3, 4, 1, 6, 5],
[22.9, 33.49, 34.5, 27.61, 19.5, 10.11, 37.90, 31.08],
],
[
'#N/A',
[1, 2, 3],
[4, 5],
],
[
'#DIV/0!',
[1, 2, 3],
[4, null, null],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/VARP.php | tests/data/Calculation/Statistical/VARP.php | <?php
declare(strict_types=1);
return [
[
678.84,
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
],
[
'#DIV/0!',
[true, false],
],
[
0.0,
[true, false, 1],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/VARA_ODS.php | tests/data/Calculation/Statistical/VARA_ODS.php | <?php
declare(strict_types=1);
return [
[
754.266666666667,
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
],
[
0.5,
[true, false],
],
[
0.333333333333,
[true, false, 1],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/STDEVP_ODS.php | tests/data/Calculation/Statistical/STDEVP_ODS.php | <?php
declare(strict_types=1);
return [
[
26.0545581424825,
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
],
[
'#DIV/0!',
['A', 'B', 'C'],
],
[
0.5,
[true, false],
],
[
0.471404520791,
[true, false, 1],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/AVERAGEIFS.php | tests/data/Calculation/Statistical/AVERAGEIFS.php | <?php
declare(strict_types=1);
return [
'no argument' => [
'exception',
],
[
80.5,
[75, 94, 86, 'incomplete'],
[75, 94, 86, 'incomplete'],
'>70',
[75, 94, 86, 'incomplete'],
'<90',
],
[
'#DIV/0!',
[85, 80, 93, 75],
[85, 80, 93, 75],
'>95',
],
[
87.5,
[87, 88, 'incomplete', 75],
[87, 88, 'incomplete', 75],
'<>incomplete',
[87, 88, 'incomplete', 75],
'>80',
],
[
174000,
[223000, 125000, 456000, 322000, 340000, 198000, 310000, 250000, 460000, 261000, 389000, 305000],
[1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4],
1,
['North', 'North', 'South', 'North', 'North', 'South', 'North', 'North', 'South', 'North', 'North', 'South'],
'North',
],
[
285500,
[223000, 125000, 456000, 322000, 340000, 198000, 310000, 250000, 460000, 261000, 389000, 305000],
[1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4],
'>2',
['Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol'],
'Jeff',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/TDIST.php | tests/data/Calculation/Statistical/TDIST.php | <?php
declare(strict_types=1);
return [
[
0.027322464988,
1.959999998, 60, 1,
],
[
0.054644929976,
1.959999998, 60, 2,
],
[
0.170446566151,
1, 10, 1,
],
[
0.340893132302,
1, 10, 2,
],
[
0.028237990213,
2, 25, 1,
],
[
0.056475980427,
2, 25, 2,
],
'test 1 derived from Perl suite 1-tail' => [
0.0041301,
6.251, 3, 1,
],
'test 2 derived from Perl suite 2-tail' => [
0.0082602,
6.251, 3, 2,
],
'issue 4167' => [
0.31730337488351257,
1.8373862310371, 1, 2,
],
[
'#VALUE!',
'NaN', 10, 2,
],
[
'#VALUE!',
1, 'NaN', 2,
],
[
'#VALUE!',
1, 10, 'NaN',
],
[
'#NUM!',
-1, 10, 2,
],
[
'#NUM!',
1, 0, 2,
],
[
'#NUM!',
1, 10, 0,
],
[
'#NUM!',
1, 10, 3,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/LINEST.php | tests/data/Calculation/Statistical/LINEST.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
[1.0, 0.0],
[1, 2, 3, 4, 5],
[1, 2, 3, 4, 5],
false,
false,
],
[
[2.310344827586207, 0.0],
[1, 9, 5, 7],
[0, 4, 2, 3],
false,
false,
],
[
[2.0, 1.0],
[1, 9, 5, 7],
[0, 4, 2, 3],
true,
false,
],
[
[0.600378787879, 0.0],
[3, 10, 3, 6, 8, 12, 1, 4, 9, 14],
[8, 2, 11, 6, 5, 4, 12, 9, 6, 1],
false,
false,
],
[
[-1.1064189189190, 14.081081081081],
[3, 10, 3, 6, 8, 12, 1, 4, 9, 14],
[8, 2, 11, 6, 5, 4, 12, 9, 6, 1],
true,
false,
],
[
[
[0.600378787879, 0.0],
[0.3130441135917, ExcelError::NA()],
[0.2901220667036, 7.193206086629],
[3.6782360429317, 9],
[190.3200757575760, 465.679924242424],
],
[3, 10, 3, 6, 8, 12, 1, 4, 9, 14],
[8, 2, 11, 6, 5, 4, 12, 9, 6, 1],
false,
true,
],
[
[
[-1.1064189189190, 14.081081081081],
[0.1491074289251, 1.083468383961],
[0.8731378215565, 1.622464237727],
[55.0605598780781, 8],
[144.9408783783780, 21.059121621622],
],
[3, 10, 3, 6, 8, 12, 1, 4, 9, 14],
[8, 2, 11, 6, 5, 4, 12, 9, 6, 1],
true,
true,
],
[
[
[56.837944664032, 11704.347826086974],
[54.403741747077, 131988.39973671117],
[0.108159322123, 13123.598915116556],
[1.091488562082, 9],
[187985818.1818185, 1550059636.363636],
],
[142000, 144000, 151000, 150000, 139000, 169000, 126000, 142900, 163000, 169000, 149000],
[2310, 2333, 2356, 2379, 2402, 2425, 2448, 2471, 2494, 2517, 2540],
true,
true,
],
// 'multi-series' => [
// [
// [-234.2371645, 2553.21066, 12529.76817, 27.64138737, 52317.83051],
// [13.26801148, 530.6691519, 400.0668382, 5.429374042, 12237.3616],
// [0.996747993, 970.5784629, '#N/A', '#N/A', '#N/A'],
// [459.7536742, 6, '#N/A', '#N/A', '#N/A'],
// [1732393319, 5652135.316, '#N/A', '#N/A', '#N/A'],
// ],
// [142000, 144000, 151000, 150000, 139000, 169000, 126000, 142900, 163000, 169000, 149000],
// [
// [2310, 2, 2, 20],
// [2333, 2, 2, 12],
// [2356, 3, 1.5, 33],
// [2379, 3, 2, 43],
// [2402, 2, 3, 53],
// [2425, 4, 2, 23],
// [2448, 2, 1.5, 99],
// [2471, 2, 2, 34],
// [2494, 3, 3, 23],
// [2517, 4, 4, 55],
// [2540, 2, 3, 22],
// ],
// true,
// true,
// ],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/FISHERINV.php | tests/data/Calculation/Statistical/FISHERINV.php | <?php
declare(strict_types=1);
return [
[
-0.197375320225,
-0.2,
],
[
0.0,
0.0,
],
[
0.761594155956,
1.0,
],
[
0.992631520201,
2.8,
],
[
0.7499999990254,
0.9729550723,
],
[
'#VALUE!',
'NAN',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/FDIST.php | tests/data/Calculation/Statistical/FDIST.php | <?php
declare(strict_types=1);
return [
[
0.001223791709,
15.2069, 6, 4, false,
],
[
0.990000043003,
15.2069, 6, 4, true,
],
[
0.308000821694,
1, 2, 5, false,
],
[
0.568798849629,
1, 2, 5, true,
],
[
0.0241472644208,
5, 1, 2, false,
],
[
0.8451542547285,
5, 1, 2, true,
],
[
0.0006669496615,
65, 2, 1, false,
],
[
0.9126295943339,
65, 2, 1, true,
],
[
4.7306581130012E-6,
65, 8, 5, false,
],
[
0.9998747923834,
65, 8, 5, true,
],
[
0.0017323823929,
7.5, 13, 8, false,
],
[
0.9961476916638,
7.5, 13, 8, true,
],
[
'#VALUE!',
'NAN', 13, 8, true,
],
[
'#VALUE!',
7.5, 'NAN', 8, true,
],
'too many arguments' => [
'exception',
7.5, 13, 'NAN', 8, false,
],
[
'#NUM!',
-7.5, 13, 8, true,
],
[
'#NUM!',
7.5, 0, 8, true,
],
[
'#NUM!',
7.5, 13, 0, true,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/COVAR.php | tests/data/Calculation/Statistical/COVAR.php | <?php
declare(strict_types=1);
return [
[
5.2,
[3, 2, 4, 5, 6],
[9, 7, 12, 15, 17],
],
[
16.633125,
[2, 7, 8, 3, 4, 1, 6, 5],
[22.9, 33.49, 34.5, 27.61, 19.5, 10.11, 37.9, 31.08],
],
[
'#N/A',
[1, 2, 3],
[4, 5],
],
[
'#DIV/0!',
[1, 2, 3],
[4, null, null],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/BINOMDISTRANGE.php | tests/data/Calculation/Statistical/BINOMDISTRANGE.php | <?php
declare(strict_types=1);
return [
[
0.083974967429,
60, 0.75, 48,
],
[
0.5236297934719,
60, 0.75, 45, 50,
],
[
0.0284439668205,
100, 0.5, 0, 40,
],
[
0.728746975926,
100, 0.5, 45, 55,
],
[
0.539794618694,
100, 0.5, 50, 100,
],
[
0.079589237387,
100, 0.5, 50,
],
[
0.079589237387,
100, 0.5, 50, null,
],
[
'#VALUE!',
'NaN', 0.5, 50, 100,
],
[
'#VALUE!',
100, 'NaN', 50, 100,
],
[
'#VALUE!',
100, 0.5, 'NaN', 100,
],
[
'#VALUE!',
100, 0.5, 50, 'NaN',
],
[
'#NUM!',
100, -0.5, 50, 100,
],
[
'#NUM!',
100, 1.5, 50, 100,
],
[
'#NUM!',
100, 0.5, -5, 100,
],
[
'#NUM!',
10, 0.5, 50, 100,
],
[
'#NUM!',
100, 0.5, 50, -10,
],
[
'#NUM!',
100, 0.5, 50, -110,
],
[
'#NUM!',
100, 0.5, 50, 40,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/MAXA.php | tests/data/Calculation/Statistical/MAXA.php | <?php
declare(strict_types=1);
return [
[
27,
10, 7, 9, 27, 2,
],
[
10,
10, 7, 9, '17', 2,
],
[
0,
-10, -7, -9, '17', -2,
],
[
1,
-10, true, -9, '17', -2,
],
[
1,
null, 'STRING', true, '', -2, 0, false, '27',
],
[
0,
null, 'STRING', '', 'xl95',
],
[
0,
null, null, null, null,
],
'error among arguments' => [
'#DIV/0!',
1, 3, '=5/0', -2,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/TdotINV.php | tests/data/Calculation/Statistical/TdotINV.php | <?php
declare(strict_types=1);
return [
[
-1.625583529294314,
0.05464, 60,
],
[
-0.699812061,
0.25, 10,
],
[
0.0,
0.5, 10,
],
'issue 4167' => [
-6.313746407466989,
0.05, 1,
],
[
0.5095256881847339,
0.65, 1,
],
[
'#VALUE!',
'NaN', 10,
],
[
'#VALUE!',
0.5, 'NaN',
],
[
'#NUM!',
-0.5, 10,
],
[
'#NUM!',
0.5, 0,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/LOGNORMDIST2.php | tests/data/Calculation/Statistical/LOGNORMDIST2.php | <?php
declare(strict_types=1);
return [
[0.0390835557068, 4, 3.5, 1.2, true],
[0.0176175966818, 4, 3.5, 1.2, false],
[0.0162328457851, 0.5, 10, 5, true],
[0.0162104821842, 0.5, 10, 5, false],
[0.0664171147992, 12, 10, 5, true],
[0.0021488646273, 12, 10, 5, false],
[0.0201708646513, 8, 7, 2.4, true],
[0.0025400389694, 8, 7, 2.4, false],
[0.0390835557068, 4, 3.5, 1.2, true],
[0.0176175966818, 4, 3.5, 1.2, false],
[0.0847348867430, 3, 2.5, 1.02, true],
[0.0507335863525, 3, 2.5, 1.02, false],
[0.2618068896629, 1.1, 2.2, 3.3, true],
[0.0896756593248, 1.1, 2.2, 3.3, false],
[0.7566441984111, 1.1, -2.2, 3.3, true],
[0.0862879718374, 1.1, -2.2, 3.3, false],
['#NUM!', -1.1, 2.2, 3.3, true],
['#NUM!', 1.1, 2.2, -3.3, true],
['#VALUE!', 'NaN', 0.1, 0.2, true],
['#VALUE!', 1.1, 'NaN', 0.2, true],
['#VALUE!', 1.1, 0.1, 'NaN', true],
['#VALUE!', 1.1, 0.1, 0.2, 'NaN'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/VARA.php | tests/data/Calculation/Statistical/VARA.php | <?php
declare(strict_types=1);
return [
[
754.266666666667,
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
],
[
0.5,
[true, false],
],
[
0.333333333333,
[true, false, 1],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/MAX.php | tests/data/Calculation/Statistical/MAX.php | <?php
declare(strict_types=1);
return [
[
27,
10, 7, 9, 27, 2,
],
[
10,
10, 7, 9, '27', 2,
],
[
0,
null, 'STRING', true, '', '27',
],
'error among arguments' => [
'#DIV/0!',
1, 3, '=5/0', -2,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/CHIDISTRightTail.php | tests/data/Calculation/Statistical/CHIDISTRightTail.php | <?php
declare(strict_types=1);
return [
[
0.964294972685,
3, 9,
],
[
0.4837673815536,
7.5, 8,
],
[
0.050000589092,
18.307, 10,
],
[
0.479500122187,
0.5, 1,
],
[
0.113846298007,
2.5, 1,
],
[
0.778800783071,
0.5, 2,
],
[
0.918891411655,
0.5, 3,
],
[
0.046011705689,
8, 3,
],
[
'#VALUE!',
'NaN', 3,
],
[
'#VALUE!',
8, 'NaN',
],
'Value < 0' => [
'#NUM!',
-8, 3,
],
'Degrees < 1' => [
'#NUM!',
8, 0,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/GROWTH.php | tests/data/Calculation/Statistical/GROWTH.php | <?php
declare(strict_types=1);
return [
[
[
[32618.203773539713],
[47729.42261474774],
[69841.30085621739],
[102197.07337883231],
[149542.48674004572],
[218821.87621459525],
],
[33100, 47300, 69000, 102000, 150000, 220000],
[11, 12, 13, 14, 15, 16],
],
[
[
[320196.71836347197],
[468536.05418404756],
],
[33100, 47300, 69000, 102000, 150000, 220000],
[11, 12, 13, 14, 15, 16],
[17, 18],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/tDotDistTrue.php | tests/data/Calculation/Statistical/tDotDistTrue.php | <?php
declare(strict_types=1);
return [
[
0.9726775350120389,
1.959999998, 60,
],
'negative value' => [
0.02732246498796111,
-1.959999998, 60,
],
[
0.8295534338489702,
1, 10,
],
[
0.9717620097865514,
2, 25,
],
'test 2 derived from Perl suite 2-tail' => [
0.9958699007658498,
6.251, 3,
],
'issue 4167' => [
0.8413483125582437,
1.8373862310371, 1,
],
[
0.649999886410997,
0.509525, 1,
],
[
0.251885526,
-0.7, 8,
],
[
'#VALUE!',
'NaN', 10,
],
[
'#VALUE!',
1, 'NaN',
],
[
0.17044656615102982,
-1, 10,
],
[
'#NUM!',
1, 0,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/VAR.php | tests/data/Calculation/Statistical/VAR.php | <?php
declare(strict_types=1);
return [
[
754.266666666667,
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
],
[
'#DIV/0!',
[true, false],
],
[
'#DIV/0!',
[true, false, 1],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/TRIMMEAN.php | tests/data/Calculation/Statistical/TRIMMEAN.php | <?php
declare(strict_types=1);
return [
[
3.777777777778,
[4, 5, 6, 7, 2, 3, 4, 5, 1, 2, 3],
0.2,
],
[
9.45,
[0.5, 6, 7, 7, 8, 8, 9, 9, 16, 24],
0.15,
],
[
8.75,
[0.5, 6, 7, 7, 8, 8, 9, 9, 16, 24],
0.2,
],
[
8.0,
[0.5, 6, 7, 7, 8, 8, 9, 9, 16, 24],
0.4,
],
[
'#NUM!',
[0.5, 6, 7, 7, 8, 8, 9, 9, 16, 24],
15,
],
[
'#VALUE!',
[0.5, 6, 7, 7, 8, 8, 9, 9, 16, 24],
'NaN',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/STDEVA.php | tests/data/Calculation/Statistical/STDEVA.php | <?php
declare(strict_types=1);
return [
[
27.463915719843,
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
],
[
'#DIV/0!',
[],
],
[
0.707106781187,
[true, false],
],
[
0.577350269190,
[true, false, 1],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/CHITEST.php | tests/data/Calculation/Statistical/CHITEST.php | <?php
declare(strict_types=1);
return [
[
0.0152703571482,
[[112, 76], [85, 95]],
[[100, 85], [70, 90]],
],
[
0.000308192027,
[[58, 35], [11, 25], [10, 23]],
[[45.35, 47.65], [17.56, 18.44], [16.09, 16.91]],
],
[
0.015888560447,
[[58], [11], [10]],
[[45.35], [17.56], [16.09]],
],
[
0.008682970191,
[[58, 35]],
[[45.35, 47.65]],
],
[
'#NUM!',
[[58, 11], [10, 35], [25]],
[[45.35, 17.56], [16.09, 47.65], [18.44, 16.91]],
],
[
'#DIV/0!',
[[112, 76], [85, 95]],
[[100, 0], [70, 90]],
],
[
'#NUM!',
[[112, 76], [85, 95]],
[[100, 85], [-70, 90]],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/COUNTIF.php | tests/data/Calculation/Statistical/COUNTIF.php | <?php
declare(strict_types=1);
return [
[
2,
['apples', 'oranges', 'peaches', 'apples'],
'apples',
],
[
2,
['ApPlEs', 'oranges', 'peaches', 'APPles'],
'aPpLeS',
],
[
2,
[32, 54, 75, 86],
'>55',
],
[
3,
[32, 54, 75, 86],
'<=75',
],
[
2,
[6, 3, 4, 'X', '', null],
'<=4',
],
[
2,
[6, 3, 4, 31, 'X', '', null],
'<="4"',
],
[
2,
[0, 1, 1, 2, 3, 5, 8, 0, 13, 21],
0,
],
[
3,
[true, false, false, true, false, true, false, false],
true,
],
[
5,
[true, false, false, true, false, true, false, false],
'<>true',
],
[
4,
['apples', 'oranges', 'peaches', 'apples'],
'*',
],
[
3,
['apples', 'oranges', 'peaches', 'apples'],
'*p*s*',
],
[
2,
['apples', 'oranges', 'peaches', 'apples'],
'?????es',
],
[
2,
['great * ratings', 'bad * ratings', 'films * wars', 'films * trek', 'music * radio'],
'*~* ra*s',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/STANDARDIZE.php | tests/data/Calculation/Statistical/STANDARDIZE.php | <?php
declare(strict_types=1);
return [
[1.333333333333, 42, 40, 1.5],
[0.25, 5.5, 5, 2],
[20, 5.5, 1.5, 0.2],
[-2.0, 12, 15, 1.5],
[-0.4, -2, 0, 5],
[-0.676, 63.81, 65.5, 2.5],
['#NUM!', 1.1, -2.2, -3.3],
['#VALUE!', 'NAN', 0.1, 0.2],
['#VALUE!', 0.1, 'NAN', 0.2],
['#VALUE!', 0.1, 0.2, 'NAN'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/STDEV.php | tests/data/Calculation/Statistical/STDEV.php | <?php
declare(strict_types=1);
return [
[
27.463915719843,
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
],
[
'#DIV/0!',
['A', 'B', 'C'],
],
[
'#DIV/0!',
[true, false],
],
[
'#DIV/0!',
[true, false, 1],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/BINOMINV.php | tests/data/Calculation/Statistical/BINOMINV.php | <?php
declare(strict_types=1);
return [
[
32,
100, 0.3, 0.7,
],
[
4,
6, 0.5, 0.75,
],
[
7,
12, 0.5, 0.75,
],
[
46,
100, 0.5, 0.2,
],
[
50,
100, 0.5, 0.5,
],
[
56,
100, 0.5, 0.9,
],
[
'#VALUE!',
'NaN', 0.5, 0.9,
],
[
'#VALUE!',
100, 'NaN', 0.9,
],
[
'#VALUE!',
100, 0.5, 'NaN',
],
[
'#NUM!',
-1, 0.5, 0.9,
],
[
'#NUM!',
100, -0.5, 0.9,
],
[
'#NUM!',
100, 1.5, 0.9,
],
[
'#NUM!',
100, 0.5, -0.9,
],
[
'#NUM!',
100, 0.5, 1.9,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/MEDIAN.php | tests/data/Calculation/Statistical/MEDIAN.php | <?php
declare(strict_types=1);
return [
[
8.0,
1, 4.5, 7, 8, 9, 13, 14,
],
[
8.5,
1, 4.5, 7, 8, 9, 13, 14, 12,
],
[
8.0,
1, 4.5, 7, 8, 9, 13, 14, '',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/MAXIFS.php | tests/data/Calculation/Statistical/MAXIFS.php | <?php
declare(strict_types=1);
return [
'no argument' => [
'exception',
],
[
2,
[1, 2, 3],
['Y', 'Y', 'N'],
'=Y',
['H', 'H', 'H'],
'=H',
],
[
2,
[1, 2, 3],
['Y', 'Y', 'N'],
'=Y',
],
[
2,
[1, 2, 3],
['A', 'B', 'C'],
'=B',
['C', 'B', 'A'],
'=B',
],
[
456000,
[223000, 125000, 456000, 322000, 340000, 198000, 310000, 250000, 460000, 261000, 389000, 305000],
[1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4],
1,
],
[
310000,
[223000, 125000, 456000, 322000, 340000, 198000, 310000, 250000, 460000, 261000, 389000, 305000],
[1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4],
'>2',
['Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol'],
'Jeff',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/FORECAST.php | tests/data/Calculation/Statistical/FORECAST.php | <?php
declare(strict_types=1);
return [
[
10.607253086419,
30,
[6, 7, 9, 15, 21],
[20, 28, 31, 38, 40],
],
[
11.8937852010975,
5,
[10.5, 7.2, 200, 5.4, 8.1],
[-3, 4, 120, 2, 7.5],
],
[
20.032698660553,
10,
[10.5, 7.2, 200, 5.4, 8.1],
[-3, 4, 120, 2, 7.5],
],
[
5.0,
8,
[1, 2, 3],
[4, 5, 6],
],
[
10.657142857143,
7,
[5.8, -1],
[2, -5],
],
[
-5.0,
50,
[-1, -2, -3, -4],
[10, 20, 30, 40],
],
[
32.666666666667,
7,
[3, 7, 15, 20, 22, 27],
[1, 2, 3, 4, 5, 6],
],
[
'#VALUE!',
'NaN',
[1, 2, 3],
[4, 5],
],
[
'#N/A',
2,
[1, 2, 3],
[4, 5],
],
[
'#DIV/0!',
2,
[1, 2, 3],
[4, null, null],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/HARMEAN.php | tests/data/Calculation/Statistical/HARMEAN.php | <?php
declare(strict_types=1);
return [
[
5.028375962062,
4, 5, 8, 7, 11, 4, 3,
],
[
1.2295081967213,
2.5, 3, 0.5, 1, 3,
],
[
'#NUM!',
2.5, -3, 0.5, 1, 3,
],
[
'#NUM!',
2.5, 3, 0.0, 1, 3,
],
'no arguments' => [
'exception',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/GAMMA.php | tests/data/Calculation/Statistical/GAMMA.php | <?php
declare(strict_types=1);
return [
[1.329340388179, 2.5],
[0.267865934620, -3.75],
[9.513507698669, 0.1],
[1.0, 1.0],
[0.886226925453, 1.5],
[1.3293403881791, 2.5],
[17.837861981813, 4.8],
[52.342777784553, 5.5],
'Zero value' => ['#NUM!', 0.0],
'Negative integer value' => ['#NUM!', -1],
['#VALUE!', 'NAN'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/RANK.php | tests/data/Calculation/Statistical/RANK.php | <?php
declare(strict_types=1);
return [
[
2,
3.5,
[7, 3.5, 3.5, 2, 1],
],
[
1,
7,
[7, 3.5, 3.5, 2, 1],
],
[
3,
3.5,
[7, 3.5, 3.5, 1, 2],
1,
],
[
5,
7,
[7, 3.5, 3.5, 1, 2],
1,
],
[
4,
7.2,
[10.5, 7.2, 200, 5.4, 8.1],
],
[
2,
3.5,
[7, 3.5, 'ONE', 'UNO', 3.5, 1, 2],
],
[
'#VALUE!',
'Uno',
[1, 'Deux', 2, 'Uno', 3, 4],
],
[
3,
2,
[1, 'Deux', 2, 'Uno', 3, 4],
],
[
2,
3,
[1, 'Deux', 2, 'Uno', 3, 4],
],
[
'#N/A',
1.5,
[7, 3.5, 3.5, 1, 2],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/GEOMEAN.php | tests/data/Calculation/Statistical/GEOMEAN.php | <?php
declare(strict_types=1);
return [
[
5.47698696965696,
4, 5, 8, 7, 11, 4, 3,
],
[
1.6226711115996,
2.5, 3, 0.5, 1, 3,
],
'no arguments' => [
'exception',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/STDEVA_ODS.php | tests/data/Calculation/Statistical/STDEVA_ODS.php | <?php
declare(strict_types=1);
return [
[
27.463915719843,
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
],
[
'#DIV/0!',
[],
],
[
0.7071067811865476,
[true, false],
],
[
0.577350269190,
[true, false, 1],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/STDEVPA_ODS.php | tests/data/Calculation/Statistical/STDEVPA_ODS.php | <?php
declare(strict_types=1);
return [
[
26.0545581424825,
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
],
[
'#DIV/0!',
[],
],
[
0.5,
[true, false],
],
[
0.471404520791,
[true, false, 1],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/LOGINV.php | tests/data/Calculation/Statistical/LOGINV.php | <?php
declare(strict_types=1);
return [
[
4.000025209777,
0.039084, 3.5, 1.2,
],
[
6.653346075337,
0.3, 2, 0.2,
],
[
7.135708009256,
0.3, 2.5, 1.02,
],
[
'#VALUE!',
'NaN', 2.2, 3.3,
],
[
'#VALUE!',
0.1, 'NaN', 3.3,
],
[
'#VALUE!',
0.1, 2.2, 'NaN',
],
[
'#NUM!',
-0.1, 2.2, 3.3,
],
[
'#NUM!',
1.1, 2.2, 3.3,
],
[
'#NUM!',
0.1, 2.2, -3.3,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/GnumericCOUNT.php | tests/data/Calculation/Statistical/GnumericCOUNT.php | <?php
declare(strict_types=1);
return [
'range does not count bool, null, text string' => [
3,
[
// The index simulates a cell value
'0.1.A' => 'A',
'0.2.A' => 1,
'0.3.A' => true,
'0.4.A' => 2.9,
'0.5.A' => false,
'0.6.A' => '3',
'0.7.A' => '',
'0.8.A' => null,
'0.9.A' => 9,
],
],
'direct values also do not count bool, null, text string' => [
3,
// No index indicates arguments passed as literals rather than cell values
'A',
1,
true,
2.9,
false,
'3',
'',
null,
9,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/CONFIDENCE.php | tests/data/Calculation/Statistical/CONFIDENCE.php | <?php
declare(strict_types=1);
return [
[
0.692951912734,
0.05, 2.5, 50,
],
[
0.48999099653,
0.05, 2.5, 100,
],
[
0.013719747903,
0.05, 0.07, 100,
],
[
'#VALUE!',
'NAN', 0.07, 100,
],
[
'#NUM!',
1.05, 0.07, 100,
],
[
'#NUM!',
0.05, -0.07, 100,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/ZTEST.php | tests/data/Calculation/Statistical/ZTEST.php | <?php
declare(strict_types=1);
return [
[
0.090574196851,
[3, 6, 7, 8, 6, 5, 4, 2, 1, 9],
4,
],
[
0.863043389130,
[3, 6, 7, 8, 6, 5, 4, 2, 1, 9],
6,
],
[
0.371103278559,
[4, 5, 2, 5, 8, 9, 3, 2, 3, 8, 9, 5],
5,
],
[
0.83812918702,
[4, 5, 2, 5, 8, 9, 3, 2, 3, 8, 9, 5],
6,
],
[
0.412070447871,
[1, 2, 3, 3, 4, 4, 8, 10, 12],
5,
3,
],
[
0.00012286639,
[24, 22, 19, 21, 18, 19, 20, 23],
18,
],
[
0.952209647727,
[24, 22, 19, 21, 18, 19, 20, 23],
22,
],
[
0.952209647727,
[24, 22, 19, 21, 18, 19, 20, 23],
22,
null,
],
[
'#VALUE!',
[1, 2, 3, 3, 4, 4, 8, 10, 12],
'NaN',
3,
],
[
'#VALUE!',
[1, 2, 3, 3, 4, 4, 8, 10, 12],
5,
'NaN',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/CHIINVRightTail.php | tests/data/Calculation/Statistical/CHIINVRightTail.php | <?php
declare(strict_types=1);
return [
[
8.383430828608,
0.3, 7,
],
[
6.737200771955,
0.75, 10,
],
[
0.007716715545,
0.93, 1,
],
[
1.021651247532,
0.6, 2,
],
[
0.45493642312,
0.5, 1,
],
[
4.351460191096,
0.5, 5,
],
[
0.101531044268,
0.75, 1,
],
[
4.605170185988,
0.1, 2,
],
[
0.446287102628,
0.8, 2,
],
[
4.108344935632,
0.25, 3,
],
[
'#VALUE!',
'NaN', 3,
],
[
'#VALUE!',
0.25, 'NaN',
],
'Probability < 0' => [
'#NUM!',
-0.1, 3,
],
'Probability > 1' => [
'#NUM!',
1.1, 3,
],
'Freedom > 1' => [
'#NUM!',
0.1, 0.5,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/HYPGEOMDIST.php | tests/data/Calculation/Statistical/HYPGEOMDIST.php | <?php
declare(strict_types=1);
return [
[
0.3632610939112,
1, 4, 8, 20,
],
[
0.4525252525252,
1, 4, 4, 12,
],
[
0.3393939393939,
2, 4, 4, 12,
],
[
0.0646464646465,
3, 4, 4, 12,
],
[
0.0020202020202,
4, 4, 4, 12,
],
[
'#VALUE!',
'NAN', 4, 4, 12,
],
[
'#VALUE!',
4, 'NAN', 4, 12,
],
[
'#VALUE!',
4, 4, 'NAN', 12,
],
[
'#VALUE!',
4, 4, 4, 'NAN',
],
[
'#NUM!',
-1, 4, 4, 12,
],
[
'#NUM!',
0, 0, 4, 12,
],
[
'#NUM!',
4, 15, 4, 12,
],
[
'#NUM!',
5, 4, 4, 12,
],
[
'#NUM!',
5, 5, 4, 12,
],
[
'#NUM!',
5, 5, -4, 12,
],
[
'#NUM!',
5, 5, 15, 12,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/VAR_ODS.php | tests/data/Calculation/Statistical/VAR_ODS.php | <?php
declare(strict_types=1);
return [
[
754.266666666667,
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
],
[
0.5,
[true, false],
],
[
0.333333333333,
[true, false, 1],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/TINV.php | tests/data/Calculation/Statistical/TINV.php | <?php
declare(strict_types=1);
return [
[
1.960041187127,
0.05464, 60,
],
[
1.221255395004,
0.25, 10,
],
[
0.699812061312,
0.5, 10,
],
'issue 4167' => [
12.706204736174712,
0.05, 1,
],
[
'#VALUE!',
'NaN', 10,
],
[
'#VALUE!',
0.5, 'NaN',
],
[
'#NUM!',
-0.5, 10,
],
[
'#NUM!',
0.5, 0,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.