PhpSpreadsheet/tests/data
oleibman 497a934374
Fix for 3 Issues Involving ReadXlsx and NamedRange (#1742)
* Fix for 3 Issues Involving ReadXlsx and NamedRange

Issues #1686 and #1723, which provide sample spreadsheets, are probably
solved by this ticket. Issue #1730 is also probably solved, but I have
no way to verify.

There are two problems with how PhpSpreadsheet is handling things now.
Although the first problem is much less severe, and isn't really a factor
in the issues named above, it is helpful to get it out of the way first.
If you define a named range in Excel, and then delete the sheet where
the range exists, Excel saves the range as #REF!. If there is a cell which
references the range, it will similarly have the value #REF! when you open
the Excel file.
Currently, PhpSpreadsheet discards the #REF! definition, so a cell which
references the range will appear as #NAME? rather than #REF!.
This PR changes the behavior so that PhpSpreadsheet retains the #REF!
definition, and cells which reference it will appear as #REF!.

The second problem is the more severe, and is, I believe, responsible
for the 3 issues identified above.
If you define a named range and the sheet on which the range is defined
does not exist at the time, Excel will save the range as something like:

'[1]Unknown Sheet'!$A$1

If a cell references such a range, Excel will again display #REF!.
PhpSpreadsheet currently throws an Exception when it encounters
such a definition while reading the file. This PR changes
the behavior so that PhpSpreadsheet saves the definition as #REF!,
and cells which reference it will behave similarly.

For the record, I will note that Excel does not magically recalculate when a
missing sheet is subsequently added, despite the fact that the reference
might now become resolvable. PhpSpreadsheet behaves likewise.

* Remove Dead Code in Test

Identified it after push but before merge.
2020-12-10 18:08:10 +01:00
..
Calculation More unit tests for statistical functions, including a bugfix to LARGE() (#1601) 2020-07-29 23:56:37 +02:00
Cell Helper class for the conversion of cell addresses between A1 and R1C1 formats, and vice-versa (#1558) 2020-06-27 23:03:25 +02:00
Functional/TypeAttributePreservation Avoid losing calculated value type 2018-03-03 11:51:06 +01:00
Reader Fix for 3 Issues Involving ReadXlsx and NamedRange (#1742) 2020-12-10 18:08:10 +01:00
Shared Corrected date time detection (#1492) 2020-06-20 17:15:38 +02:00
Style Improve HTML Writer (#1464) 2020-05-18 12:43:18 +09:00
Writer Named formula implementation, and improved handling of Defined Names generally (#1535) 2020-07-26 12:00:06 +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
ReferenceHelperFormulaUpdates.php Additional Unit Tests (#1582) 2020-07-14 10:58:50 +02:00
ReferenceHelperFormulaUpdatesMultipleSheet.php Named formula implementation, and improved handling of Defined Names generally (#1535) 2020-07-26 12:00:06 +02:00