qax-os / excelize

Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
https://xuri.me/excelize
BSD 3-Clause "New" or "Revised" License
18.05k stars 1.71k forks source link

Support for the new method GetAllLinkedDataValidations to retrieve data validation content from linked sheets. #1834

Closed iEvan-lhr closed 7 months ago

iEvan-lhr commented 7 months ago

PR Details

Description This commit introduces the new GetAllLinkedDataValidations method as a temporary solution to address the issue where the GetDataValidations method fails to completely retrieve all data validations, especially those linked to other sheets. The addition of this method enhances the library's functionality by allowing users to extract associated data validation content from other sheets using the Ext structure. It's important to note that this is an interim fix and the Ext structure may encompass more than just the data validation components.

Related Issue

Motivation and Context The motivation behind this change is to provide a reliable method for users to retrieve all data validations, including those linked to different sheets within a workbook. This is crucial for applications that rely on complete data validation information for data integrity and user input control.

How Has This Been Tested The new method has been tested by integrating it within the existing test suite. Additional tests were written to ensure that the data validations are properly retrieved from linked sheets and that the Ext structure is parsed correctly. The tests involved various scenarios with different data validation configurations across multiple sheets.

Types of changes

Docs change / refactoring / dependency upgrade Bug fix (non-breaking change which fixes an issue) New feature (non-breaking change which adds functionality) Breaking change (fix or feature that would cause existing functionality to change) Checklist

My code follows the code style of this project. My change requires a change to the documentation. I have updated the documentation accordingly. I have read the CONTRIBUTING document. I have added tests to cover my changes. All new and existing tests passed.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.21%. Comparing base (9d4c2e6) to head (5af7e2e). Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1834 +/- ## ======================================= Coverage 99.21% 99.21% ======================================= Files 32 32 Lines 23930 23959 +29 ======================================= + Hits 23741 23770 +29 Misses 101 101 Partials 88 88 ``` | [Flag](https://app.codecov.io/gh/qax-os/excelize/pull/1834/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qax-os) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/qax-os/excelize/pull/1834/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qax-os) | `99.21% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qax-os#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.