Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new functions DeleteSlicer and GetSlicers #1943

Merged
merged 21 commits into from
Aug 23, 2024

Conversation

zhangyimingdatiancai
Copy link
Contributor

@zhangyimingdatiancai zhangyimingdatiancai commented Jul 6, 2024

PR Details

  1. Create a new GetSlicers function to get the slicer definition list
  2. Create a new DeleteSlicer function to delete specified slicer by the given slicer name
  3. Implement this feature in the slicer.go and xmlSlicers.go source code

Description

Slicers in spreadsheets are filter tools used along with Excel tables or pivot tables over a large amount of data. Currently, the Excelize library already supports to creation of a slicer for the table or pivot table in the worksheet. The goal of this PR is to add the function for getting and deleting slicers and support for removing slicers by the given slicer name.

Related Issue

N/A

Motivation and Context

Add get and delete slicer support

How Has This Been Tested

Complete documentation and unit tests, written unit test code in the slicer_test.go source code, incremental test coverage of line reach 100%

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.

xmlDrawing.go Outdated Show resolved Hide resolved
zhangyimingdatiancai and others added 15 commits July 15, 2024 13:07
…nge (qax-os#1941)

- Add unit test for get pivot table with across worksheet data range, update dependencies package and updated comments of the GetMergeCells function
… hyperlink by None linkType

- Update unit tests
…Axis data type (qax-os#1946)

- Introduce new exported ChartTickLabelPositionType enumeration
- Update unit tests
… for zero numeric cell value (qax-os#1947)

- Updated unit tests
…l is empty in pivot table data range

- Update unit tests
…ith an IEEE 754 "not-a-number" value or infinity
- Fix missing conditional formatting after remove column
- Fix the SetSheetVisible function panic on none views sheet
- Updated unit tests
slicer.go Show resolved Hide resolved
@zhangyimingdatiancai zhangyimingdatiancai changed the title WIP: Add get and delete slicer support Add new functions DeleteSlicer and GetSlicers Aug 18, 2024
@zhangyimingdatiancai
Copy link
Contributor Author

Hi @xuri, the DeleteSlicer function now has been implemented. I added unit tests for it. This PR ready for review.

pivotTable.go Show resolved Hide resolved
@xuri xuri added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 18, 2024
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.31%. Comparing base (9a38657) to head (678c205).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #1943    +/-   ##
========================================
  Coverage   99.31%   99.31%            
========================================
  Files          32       32            
  Lines       25002    25230   +228     
========================================
+ Hits        24830    25058   +228     
  Misses         92       92            
  Partials       80       80            
Flag Coverage Δ
unittests 99.31% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@xuri xuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution.

@xuri xuri merged commit c805be1 into qax-os:master Aug 23, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
Status: Features
Development

Successfully merging this pull request may close these issues.

7 participants