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> |
||
---|---|---|
.. | ||
Calculation | ||
Cell | ||
Functional/TypeAttributePreservation | ||
Reader | ||
Shared | ||
Style | ||
Writer | ||
CalculationBinaryComparisonOperation.php | ||
CellAbsoluteCoordinate.php | ||
CellAbsoluteReference.php | ||
CellBuildRange.php | ||
CellCoordinates.php | ||
CellExtractAllCellReferencesInRange.php | ||
CellGetRangeBoundaries.php | ||
CellMergeRangesInCollection.php | ||
CellRangeBoundaries.php | ||
CellRangeDimension.php | ||
CellSplitRange.php | ||
ColumnIndex.php | ||
ColumnString.php | ||
CoordinateIsRange.php |