PhpSpreadsheet/tests/data/Reader/XLSX
oleibman de5f450856
Data Validations Referencing Another Sheet (#2265)
See issues #1432 and #2149. Data validations on an Xlsx worksheet can be specified in two manners - one (henceforth "internal") if a list is specified from the same sheet, and a different one (henceforth "external") if a list is specified from a different sheet. Xlsx worksheet reader formerly processed only the internal format; PR #2150 fixed this so that both would be processed correctly on read. However, Xlsx worksheet writer outputs data validators only in the internal format, and that does not work for external data validations; it appears, however, that internal data validations can be specified in external format.

This PR changes Xlsx worksheet writer to use only the external format. Somewhat surprisingly, this must come after most of the other XML tags that constitute a worksheet. It shares this characteristic (and XML tag) with conditional formatting. The new test case DataValidator2Test includes a worksheet which has both internal and external data validation, as well as conditional formatting.

There is some additional namespacing work supporting Data Validations that needs to happen on Xlsx reader. Since that is substantially unchanged with this PR, that work will happen in a future namespacing phase, probably phase 2. However, there are some non-namespace-related changes to Xlsx reader in this PR:
- Cell DataValidation adds support for a new property sqref, which is initialized through Xlsx reader using a setSqref method. If not initialized at write time, the code will work as it did before the introduction of this property. In particular, before this change, data validation applied to an entire column (as in the sample spreadsheet) would be applied only through the last populated row. In addition, this also allows a user to extend a Data Validation over a range of cells rather than just a single cell; the new method is added to the documentation.
- The topLeft property had formerly been used only for worksheets which use "freeze panes". However, as luck would have it, the sample dataset provided to demonstrate the Data Validations problem uses topLeft without freeze panes, slightly affecting the view when the spreadsheet is initially opened; PhpSpreadsheet will now do so as well.

It is worth noting issue #2262, which documents a problem with the hasValidValue method involving the calculation engine. That problem existed before this PR, and I do not yet have a handle on how it might be fixed.
2021-08-24 08:58:38 -07:00
..
PageSetup.xlsx Forgot to check in the test files for the unit tests 2020-07-05 16:28:46 +02:00
autofilterTest.xlsx Refactoring xlsx reader (#1033) 2019-06-30 23:42:25 +02:00
bug1686b.xlsx Fix for 3 Issues Involving ReadXlsx and NamedRange (#1742) 2020-12-10 18:08:10 +01:00
condfmtnum.xlsx Handle ConditionalStyle NumberFormat When Reading Xlsx File (#1296) 2020-01-04 00:10:41 +01:00
conditionalFormatting2Test.xlsx Conditionals - Extend Support for (NOT)CONTAINSBLANKS (#1278) 2020-01-04 18:50:04 +01:00
conditionalFormatting3Test.xlsx #984 add support notContainsText for conditional styles in xlsx reader 2021-05-02 22:09:38 +02:00
conditionalFormattingDataBarTest.xlsx Support DataBar of conditional formatting rule (#1754) 2021-01-29 16:57:40 +01:00
conditionalFormattingTest.xlsx Refactoring xlsx reader (#1033) 2019-06-30 23:42:25 +02:00
dataValidation2Test.xlsx Fix for #2149 / Read data validations for drop down list in another sheet. (#2150) 2021-06-15 13:28:10 +02:00
dataValidationTest.xlsx Basic unit test and fix for loading data validations from xlsx file (#1063) 2019-07-08 19:55:14 +02:00
double_attr_drawing.xlsx Fix failure when parsing xlsx with drawing having double (redefined) … (#945) 2019-05-30 11:42:00 +02:00
empty_drawing.xlsx Fix #853 when loading and saving XLSX file with empty drawing cause c… (#882) 2019-05-30 10:38:03 +02:00
excelChartsTest.xlsx Fix/chart axis titles (#1760) 2021-01-31 19:13:50 +01:00
issue.1432b.xlsx Data Validations Referencing Another Sheet (#2265) 2021-08-24 08:58:38 -07:00
issue.2246a.xlsx Fix Reading XLSX files without styles.xml throws an exception. (#2247) 2021-08-16 05:05:32 -07:00
issue.2246b.xlsx Fix Reading XLSX files without styles.xml throws an exception. (#2247) 2021-08-16 05:05:32 -07:00
issue2109b.xlsx Xlsx Reader Better Namespace Handling Phase 1 Try2 (#2173) 2021-06-25 09:05:49 +02:00
namespacenonstd.xlsx Xlsx Reader Better Namespace Handling Phase 1 Try2 (#2173) 2021-06-25 09:05:49 +02:00
namespacepurl.xlsx Xlsx Reader Better Namespace Handling Phase 1 Try2 (#2173) 2021-06-25 09:05:49 +02:00
namespaces.openpyxl35.xlsx Xlsx Reader Better Namespace Handling Phase 1 Try2 (#2173) 2021-06-25 09:05:49 +02:00
namespaces.xlsx Xlsx Reader Better Namespace Handling Phase 1 Try2 (#2173) 2021-06-25 09:05:49 +02:00
namespacestd.xlsx Xlsx Reader Better Namespace Handling Phase 1 Try2 (#2173) 2021-06-25 09:05:49 +02:00
pageSetupTest.xlsx Refactoring xlsx reader (#1033) 2019-06-30 23:42:25 +02:00
pr1769e.xlsx Remove unnecessary changes. Added test 2021-04-19 11:25:48 +01:00
pr1769g.py.xlsx XLSX Reader and Empty Fill Tag (#2011) 2021-04-20 17:20:59 +02:00
pr2050cf-fill.xlsx Pattern Fill style should default to 'solid' if there is a pattern fill with colour but no style (#2050) 2021-04-30 20:05:45 +02:00
pr2225-datavalidation-onezero.xlsx Add unit tests for files with true/false (LibreOffice) in DataValidation boolean values and those with 1/0 (Excel, GoogleSheets) 2021-07-21 05:53:49 -07:00
pr2225-datavalidation-truefalse.xlsx Add unit tests for files with true/false (LibreOffice) in DataValidation boolean values and those with 1/0 (Excel, GoogleSheets) 2021-07-21 05:53:49 -07:00
propertyTest.xlsx Refactoring xlsx reader (#1033) 2019-06-30 23:42:25 +02:00
rowColumnAttributeTest.xlsx Refactoring xlsx reader (#1033) 2019-06-30 23:42:25 +02:00
sheetsChartsTest.xlsx Fix/sheets xlsx chart (#1761) 2021-01-31 18:53:54 +01:00
stylesTest.xlsx Refactoring xlsx reader (#1033) 2019-06-30 23:42:25 +02:00
urlImage.xlsx When image source is a URL, store the URL for use during extraction. (#2072) 2021-06-24 10:50:44 +02:00
without_cell_reference.xlsx Support missing attribute `r` in `c` node when reading xlsx 2017-09-22 14:49:38 +09:00