PhpSpreadsheet/tests/data/Calculation
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
..
DateTime Calculation engine empty arguments (#2143) 2021-06-10 08:49:53 +02:00
DefinedNames Named formula implementation, and improved handling of Defined Names generally (#1535) 2020-07-26 12:00:06 +02:00
Engineering Extract information functions (#2605) 2022-02-19 13:53:17 +01:00
Financial Extract information functions (#2605) 2022-02-19 13:53:17 +01:00
Functions Escape double quotes in a string value unless it's an empty string value 2022-03-05 12:44:44 +01:00
Information Add basic support for Error functions when the error is #SPILL! or #CALC! 2022-03-18 17:44:26 +01:00
Logical Convert all relevant Logical functions to support array arguments (#2600) 2022-02-18 02:56:23 +01:00
LookupRef VLOOKUP Breaks When Array Contains Null Cells (#2939) 2022-07-17 06:27:56 -07:00
MathTrig Filter null values in PRODUCT() function, as they don't affect the calculation in any way, and actually require additional code handling if they're present within the calculation itself 2022-05-17 16:40:14 +02:00
Statistical Extract information functions (#2605) 2022-02-19 13:53:17 +01:00
TextData Keep Calculated String Results Below 32K (#2921) 2022-07-04 08:30:46 -07:00
Web Initial implementation of the URLENCODE() web function (#2031) 2021-04-28 17:10:36 +02:00
BinaryComparisonOperations.php Extract some methods from the Calculation Engine into dedicated classes (#2537) 2022-02-04 16:02:29 +01:00
Calculation.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
FunctionsAsString.php MATCH with a static array should return the position of the found value based on the values submitted. 2020-04-26 22:09:31 +09:00
Translations.php Resolve `translateSeparator()` method to handle separators (row and column) for array functions as well as for function argument separators; and cleanly handle nesting levels 2022-02-27 13:01:09 +01:00