PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions/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
..
AddressTest.php Start work on array-enabling the Lookup and Reference functions (#2602) 2022-02-19 18:36:50 +01:00
AllSetupTeardown.php Minor Improvement to Test Cleanup LookupRef 2021-05-14 10:30:49 +02:00
ChooseTest.php Start work on array-enabling the Lookup and Reference functions (#2602) 2022-02-19 18:36:50 +01:00
ColumnOnSpreadsheetTest.php Minor Improvement to Test Cleanup LookupRef 2021-05-14 10:30:49 +02:00
ColumnTest.php Replace Tests With Unneeded Mocking (#2465) 2021-12-31 13:24:43 -08:00
ColumnsOnSpreadsheetTest.php Minor Improvement to Test Cleanup LookupRef 2021-05-14 10:30:49 +02:00
ColumnsTest.php Issue 2551 array enable lookup ref functions (#2606) 2022-02-19 18:49:01 +01:00
FilterTest.php Bugfix to returned column indexes for FILTER() by row 2022-03-24 22:12:08 +01:00
FormulaTextTest.php Replace Tests With Unneeded Mocking (#2465) 2021-12-31 13:24:43 -08:00
HLookupTest.php Initial work on implementing Array-enabled for the HLOOKUP() and VLOOKUP() functions (#2611) 2022-02-21 19:56:21 +01:00
HyperlinkTest.php Extract information functions (#2605) 2022-02-19 13:53:17 +01:00
IndexTest.php Start work on array-enabling the Lookup and Reference functions (#2602) 2022-02-19 18:36:50 +01:00
IndirectTest.php Minor Improvement to Test Cleanup LookupRef 2021-05-14 10:30:49 +02:00
LookupTest.php Start work on array-enabling the Lookup and Reference functions (#2602) 2022-02-19 18:36:50 +01:00
MatchTest.php Start work on array-enabling the Lookup and Reference functions (#2602) 2022-02-19 18:36:50 +01:00
MatrixHelperFunctionsTest.php Initial work implementing the FILTER() Lookup/Reference function 2022-03-20 18:01:30 +01:00
MovedFunctionsTest.php Extract information functions (#2605) 2022-02-19 13:53:17 +01:00
OffsetTest.php Replace Tests With Unneeded Mocking (#2465) 2021-12-31 13:24:43 -08:00
RowOnSpreadsheetTest.php Minor Improvement to Test Cleanup LookupRef 2021-05-14 10:30:49 +02:00
RowTest.php Replace Tests With Unneeded Mocking (#2465) 2021-12-31 13:24:43 -08:00
RowsOnSpreadsheetTest.php Minor Improvement to Test Cleanup LookupRef 2021-05-14 10:30:49 +02:00
RowsTest.php Issue 2551 array enable lookup ref functions (#2606) 2022-02-19 18:49:01 +01:00
SortByTest.php Additional unit testing 2022-03-24 17:51:06 +01:00
SortTest.php Initial work on the SORT() and SORTBY() Lookup/Reference functions 2022-03-24 12:21:27 +01:00
TransposeTest.php Replace Tests With Unneeded Mocking (#2465) 2021-12-31 13:24:43 -08:00
UniqueTest.php Fix scrutinizer issue complaint 2022-03-18 15:07:13 +01:00
VLookupTest.php VLOOKUP Breaks When Array Contains Null Cells (#2939) 2022-07-17 06:27:56 -07:00