PhpSpreadsheet/tests/data
Arne Jørgensen 1a44ef9109
Fix MATCH when comparing different numeric types (#1521)
Let MATCH compare numerics of different type (e.g. integers and floats).

```php
<?php

require 'vendor/autoload.php';

use PhpOffice\PhpSpreadsheet\Spreadsheet;

$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();

// Row: 1, 2, 3, 4, 5. MATCH for 4.6.
$sheet->getCell('A1')->setValue(1);
$sheet->getCell('A2')->setValue(2);
$sheet->getCell('A3')->setValue(3);
$sheet->getCell('A4')->setValue(4);
$sheet->getCell('A5')->setValue(5);

$sheet->getCell('B1')->setValue('=MATCH(4.6, A1:A5, 1)');

// Should echo 4, but echos '#N/A'.
echo $sheet->getCell('B1')->getCalculatedValue() . PHP_EOL;

// Row: 1, 2, 3, 3.8, 5. MATCH for 4.
$sheet->getCell('C1')->setValue(1);
$sheet->getCell('C2')->setValue(2);
$sheet->getCell('C3')->setValue(3);
$sheet->getCell('C4')->setValue(3.8);
$sheet->getCell('C5')->setValue(5);

$sheet->getCell('D1')->setValue('=MATCH(4, C1:C5, 1)');

// Should echo 4, but echos 3.
echo $sheet->getCell('D1')->getCalculatedValue() . PHP_EOL;
```

Co-authored-by: Mark Baker <mark@lange.demon.co.uk>
2020-06-19 20:54:04 +02:00
..
Calculation Fix MATCH when comparing different numeric types (#1521) 2020-06-19 20:54:04 +02:00
Cell fix: issue #1476 crash with numeric string value terminating with new line (#1481) 2020-05-23 12:49:54 +02:00
Functional/TypeAttributePreservation Avoid losing calculated value type 2018-03-03 11:51:06 +01:00
Reader CSV Sample File Was Miscoded (#1489) 2020-05-24 19:57:39 +09:00
Shared Add support protection of worksheet by a specific hash algorithm 2020-05-31 20:29:20 +09:00
Style Improve HTML Writer (#1464) 2020-05-18 12:43:18 +09:00
Writer Fix saving XLSX with drawings (#1462) 2020-05-23 13:09:10 +02:00
CalculationBinaryComparisonOperation.php Refactor tests data from custom format to PHP 2016-08-16 21:00:19 +09:00
CellAbsoluteCoordinate.php Sheet title can contain exclamation mark (in formulas) 2018-10-03 12:52:51 +09:00
CellAbsoluteReference.php Sheet title can contain exclamation mark (in formulas) 2018-10-03 12:52:51 +09:00
CellBuildRange.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
CellCoordinates.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
CellExtractAllCellReferencesInRange.php Range operator tests (#1501) 2020-06-02 07:38:35 +02:00
CellGetRangeBoundaries.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
CellMergeRangesInCollection.php Fix cell ranges causing coordinate merge error 2018-01-22 12:26:37 +09:00
CellRangeBoundaries.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
CellRangeDimension.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
CellSplitRange.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
ColumnIndex.php Consistent `stringFromColumnIndex()` and `columnIndexFromString()` 2017-11-26 15:29:08 +09:00
ColumnString.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
CoordinateIsRange.php Fix cell ranges causing coordinate merge error 2018-01-22 12:26:37 +09:00