Calc .NET > Tutorial > Cancel a calculation

The following example shows you how to cancel a long running calculation. The engine checks CalcOptions.CancellationToken throughout evaluation and aborts the run with an OperationCanceledException when the token is cancelled, which keeps a server responsive when a large workbook arrives.

C# example
VB example

Need help? Ask our developers: