mightHaveException($expectedResult); $sheet = $this->getSheet(); $sheet->fromArray( [ ['a', 'b', 'c'], ['d', 'e', 'f'], ], null, 'B3', true ); $this->getSpreadsheet()->addNamedRange( new NamedRange( 'definedname', $sheet, '$B$3:$D$11' ) ); $sheet->setCellValue('F3', $formula); $result = $sheet->getCell('F3')->getCalculatedValue(); self::assertSame($expectedResult, $result); } public static function providerExpand(): array { return require 'tests/data/Calculation/LookupRef/EXPAND.php'; } }