PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions
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
..
Database Extract information functions (#2605) 2022-02-19 13:53:17 +01:00
DateTime Last of the work on array-enabling Date/Time functions; all completed in this category 2022-02-10 20:53:58 +01:00
Engineering Eliminate Most Scrutinizer Problems in Test Suite (#2699) 2022-03-21 13:58:42 -07:00
Financial Eliminate Most Scrutinizer Problems in Test Suite (#2699) 2022-03-21 13:58:42 -07:00
Information Fix for issue #2614 (#2615) 2022-02-22 09:06:10 +01:00
Logical Eliminate Most Scrutinizer Problems in Test Suite (#2699) 2022-03-21 13:58:42 -07:00
LookupRef VLOOKUP Breaks When Array Contains Null Cells (#2939) 2022-07-17 06:27:56 -07:00
MathTrig Handling of #REF! Errors in Subtotal, and More (#2902) 2022-06-25 22:08:32 -07:00
Statistical Eliminate Most Scrutinizer Problems in Test Suite (#2699) 2022-03-21 13:58:42 -07:00
TextData All Text functions made array-ready 2022-02-12 12:22:31 +01:00
Web Eliminate Most Scrutinizer Problems in Test Suite (#2699) 2022-03-21 13:58:42 -07:00
DeprecatedExcelErrorTest.php Extract information functions (#2605) 2022-02-19 13:53:17 +01:00