Skip to content

#2260 - Added CancellationToken to Calculate#2298

Merged
JanKallman merged 3 commits intodevelop8from
feature/cancel-calc
Mar 2, 2026
Merged

#2260 - Added CancellationToken to Calculate#2298
JanKallman merged 3 commits intodevelop8from
feature/cancel-calc

Conversation

@swmal
Copy link
Contributor

@swmal swmal commented Feb 24, 2026

See #2260
Here is a wiki page that explains the functionality: https://github.com/EPPlusSoftware/EPPlus/wiki/Cancelling-a-calculation

Adds support for cancelling a running formula calculation via CancellationToken on ExcelCalculationOption. When cancelled, an OperationCanceledException is thrown and the workbook is marked as inconsistent via a poison flag that prevents subsequent Save or Calculate calls. The flag is exposed publicly as Workbook.IsCalculationInconsistent.

The feature is gated with #if !NET35 since CancellationToken is not available on that target. All other targets (net462, netstandard2.0, netstandard2.1, net8.0+) are supported.

@swmal swmal self-assigned this Feb 24, 2026
@swmal swmal added the enhancement New feature or request label Feb 24, 2026
@swmal swmal moved this to Review In Progress in Epplus Enhancements Feb 24, 2026
@swmal swmal moved this from Review In Progress to PR Backlog in Epplus Enhancements Feb 24, 2026
@JanKallman JanKallman merged commit 406b1e1 into develop8 Mar 2, 2026
1 check passed
@github-project-automation github-project-automation bot moved this from PR Backlog to Pending Release in Epplus Enhancements Mar 2, 2026
@JanKallman JanKallman deleted the feature/cancel-calc branch March 2, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Pending Release

Development

Successfully merging this pull request may close these issues.

2 participants