Skip to content

feat: add DeleteDataValidation method - #12

Merged
xuri merged 2 commits into
xuri:mainfrom
lzoeydzdnn:feat/delete-data-validation
Aug 17, 2026
Merged

feat: add DeleteDataValidation method#12
xuri merged 2 commits into
xuri:mainfrom
lzoeydzdnn:feat/delete-data-validation

Conversation

@lzoeydzdnn

Copy link
Copy Markdown
Contributor

Description

Add DeleteDataValidation method to delete data validations from a worksheet by given worksheet name and reference sequence. This function is concurrency safe.

If the reference sequence parameter is not specified, all data validations in the worksheet will be deleted.

This is a C# port of the Go Excelize DeleteDataValidation function (introduced in Go Excelize v2.8.0).

Usage

// Delete all data validations in Sheet1
excel.DeleteDataValidation("Sheet1", null);

// Delete specific data validations
excel.DeleteDataValidation("Sheet1", new[] { "A1:B2", "C3" });

Changes

  • Add DeleteDataValidation(string sheet, string[]? seqs) method to Excelize.cs
  • Add unit tests in UnitTest.cs
  • Update XML doc comments

Testing

  • All unit tests pass
  • Code coverage remains at 100% for the new method
  • Concurrency safety verified
  • Hot path updated to clear formulas cache when data validations change

Compatibility

  • No breaking changes
  • Pure additive feature

Please review and merge.

lzoeydzdnn and others added 2 commits August 16, 2026 15:45
Add DeleteDataValidation method to delete data validations by given worksheet name and reference sequence. This function is concurrency safe. All data validations in the worksheet will be deleted if not specify reference sequence parameter.
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (26b929a) to head (6793682).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #12   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines         1373      1395   +22     
  Branches       208       213    +5     
=========================================
+ Hits          1373      1395   +22     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xuri xuri left a comment

Copy link
Copy Markdown
Owner

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 added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 17, 2026
@xuri
xuri merged commit de5421e into xuri:main Aug 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants