PhpSpreadsheet/tests/data/Calculation/LookupRef
oleibman 4bf4278a39
VLOOKUP Breaks When Array Contains Null Cells (#2939)
Fix #2934. Null is passed to StringHelper::strtolower which expects string. Same problem appears to be applicable to HLOOKUP.

I noted the following problem in the code, but will document it here as well. Excel's results are not consistent when a non-numeric string is passed as the third parameter. For example, if cell Z1 contains `xyz`, Excel will return a REF error for function `VLOOKUP(whatever,whatever,Z1)`, but it returns a VALUE error for function `VLOOKUP(whatever,whatever,"xyz")`. I don't think PhpSpreadsheet can match both behaviors. For now, it will return VALUE for both, with similar results for other errors.

While studying the returned errors, I realized there is something that needs to be deprecated. `ExcelError::$errorCodes` is a public static array. This means that a user can change its value, which should not be allowed. It is replaced by a constant. Since the original is public, I think it needs to stay, but with a deprecation notice; users can reference and change it, but it will be unused in the rest of the code. I suppose this might be considered a break in functionality (that should not have been allowed in the first place).
2022-07-17 06:27:56 -07:00
..
ADDRESS.php Resolve default values when a null argument is passed for HLOOKUP(), VLOOKUP() and ADDRESS() functions 2021-05-27 12:02:38 +02:00
CHOOSE.php Lookup functions additional unit tests (#2074) 2021-05-07 23:40:30 +02:00
COLUMN.php Improved Support for INDIRECT, ROW, and COLUMN Functions (#2004) 2021-04-20 22:16:21 +02:00
COLUMNS.php COLUMNS and ROWS functions crashed in some cases 2018-01-13 18:01:50 +09:00
COLUMNSonSpreadsheet.php Improved Support for INDIRECT, ROW, and COLUMN Functions (#2004) 2021-04-20 22:16:21 +02:00
COLUMNonSpreadsheet.php Improved Support for INDIRECT, ROW, and COLUMN Functions (#2004) 2021-04-20 22:16:21 +02:00
FORMULATEXT.php Replace Tests With Unneeded Mocking (#2465) 2021-12-31 13:24:43 -08:00
HLOOKUP.php VLOOKUP Breaks When Array Contains Null Cells (#2939) 2022-07-17 06:27:56 -07:00
HYPERLINK.php Extract information functions (#2605) 2022-02-19 13:53:17 +01:00
INDEX.php Start work on array-enabling the Lookup and Reference functions (#2602) 2022-02-19 18:36:50 +01:00
INDIRECT.php more minor tweaks 2022-03-16 23:03:19 +01:00
IndirectDefinedName.xlsx Improved Support for INDIRECT, ROW, and COLUMN Functions (#2004) 2021-04-20 22:16:21 +02:00
IndirectFormulaSelection.xlsx Improved Support for INDIRECT, ROW, and COLUMN Functions (#2004) 2021-04-20 22:16:21 +02:00
LOOKUP.php Start refactoring the Lookup and Reference functions (#1912) 2021-03-10 21:18:33 +01:00
MATCH.php Fixes #2430 (#2431) 2021-12-04 08:07:18 -08:00
OFFSET.php Replace Tests With Unneeded Mocking (#2465) 2021-12-31 13:24:43 -08:00
ROW.php Improved Support for INDIRECT, ROW, and COLUMN Functions (#2004) 2021-04-20 22:16:21 +02:00
ROWS.php COLUMNS and ROWS functions crashed in some cases 2018-01-13 18:01:50 +09:00
ROWSonSpreadsheet.php Improved Support for INDIRECT, ROW, and COLUMN Functions (#2004) 2021-04-20 22:16:21 +02:00
ROWonSpreadsheet.php Improved Support for INDIRECT, ROW, and COLUMN Functions (#2004) 2021-04-20 22:16:21 +02:00
TRANSPOSE.php Start refactoring the Lookup and Reference functions (#1912) 2021-03-10 21:18:33 +01:00
VLOOKUP.php VLOOKUP Breaks When Array Contains Null Cells (#2939) 2022-07-17 06:27:56 -07:00