a5a0268050
Fixes a bug when doing a HLOOKUP on a single row. ```php <?php require 'vendor/autoload.php'; use PhpOffice\PhpSpreadsheet\Spreadsheet; $spreadsheet = new Spreadsheet(); $sheet = $spreadsheet->getActiveSheet(); /** * Single row. */ $singleRow = "=HLOOKUP(10, {5, 10, 15}, 1, 0)"; $sheet->getCell('A1')->setValue($singleRow); // Should echo 10, but echos '#N/A' and some PHP notices and warnings. echo $sheet->getCell('A1')->getCalculatedValue() . PHP_EOL; /** * Multiple rows. */ $multipleRows = "=HLOOKUP(10, {5, 10, 15; 20, 25, 30}, 1, 0)"; $sheet->getCell('A2')->setValue($multipleRows); // Should echo: 10 and also does. echo $sheet->getCell('A2')->getCalculatedValue() . PHP_EOL; ``` Co-authored-by: Mark Baker <mark@lange.demon.co.uk> |
||
---|---|---|
.. | ||
CHOOSE.php | ||
COLUMNS.php | ||
FORMULATEXT.php | ||
HLOOKUP.php | ||
INDEX.php | ||
LOOKUP.php | ||
MATCH.php | ||
ROWS.php | ||
VLOOKUP.php |