PhpSpreadsheet/tests/PhpSpreadsheetTests/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
..
Engine Handle defined names with the range operator. 2022-04-13 17:55:51 +02:00
Functions VLOOKUP Breaks When Array Contains Null Cells (#2939) 2022-07-17 06:27:56 -07:00
ArrayFormulaTest.php Convert all relevant Logical functions to support array arguments (#2600) 2022-02-18 02:56:23 +01:00
BinaryComparisonTest.php Extract some methods from the Calculation Engine into dedicated classes (#2537) 2022-02-04 16:02:29 +01:00
CalculationErrorTest.php New Error Reported with Phpstan 1.3 (#2481) 2022-01-03 17:32:52 -08:00
CalculationFunctionListTest.php Eliminate Most Scrutinizer Problems in Test Suite (#2699) 2022-03-21 13:58:42 -07:00
CalculationLoggingTest.php Unit test for the Calculation Engine debug log 2022-03-06 09:47:17 +01:00
CalculationSettingsTest.php Adjust Cell Reference regexp in Calculation Engine to handle worksheet names containing quotes (#2617) 2022-02-22 15:55:59 +01:00
CalculationTest.php Adjust Cell Reference regexp in Calculation Engine to handle worksheet names containing quotes (#2617) 2022-02-22 15:55:59 +01:00
DefinedNameConfusedForCellTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
DefinedNamesCalculationTest.php Named formula implementation, and improved handling of Defined Names generally (#1535) 2020-07-26 12:00:06 +02:00
FormulaAsStringTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
FunctionsTest.php Eliminate Most Scrutinizer Problems in Test Suite (#2699) 2022-03-21 13:58:42 -07:00
MergedCellTest.php Relax validation on merge cells to allow input of a single cell 2022-06-10 01:15:57 +02:00
NullEqualsZeroTest.php Add Test For NULL=0 (#2607) 2022-02-19 13:12:44 -08:00
ParseFormulaTest.php Escape double quotes in worksheet names for column range and row range references 2022-06-17 13:34:20 +02:00
RefErrorTest.php Handling of #REF! Errors in Subtotal, and More (#2902) 2022-06-25 22:08:32 -07:00
RowColumnReferenceTest.php Set precision for Database function unit tests, for RowColumnReference and Dimension Helper unit tests (#2604) 2022-02-18 21:37:26 +01:00
StringLengthTest.php Keep Calculated String Results Below 32K (#2921) 2022-07-04 08:30:46 -07:00
TranslationTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
XlfnFunctionsTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00