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.