New to Telerik Document ProcessingStart a free 30-day trial

Calculation Chain (Reference Map)

Updated on May 13, 2026
Minimum VersionQ2 2026

RadSpreadProcessing uses a calculation chain (also known as a reference map) to track how formula cells depend on one another and to recalculate them in the optimal order. The calculation chain activates automatically when you work with a Workbook that contains formulas, no additional API calls are required.

How the Calculation Chain Works

When a cell value changes, RadSpreadProcessing needs to recalculate every formula that directly or indirectly references that cell. The calculation chain maintains a directed dependency graph of all formula cells in the workbook. The library uses this graph to determine the minimal set of formulas that require recalculation and the correct order in which to evaluate them.

The calculation chain covers the following scenarios:

  • Opening a spreadsheet document populates the calculation chain from the existing formulas.
  • Setting or changing a cell formula updates the dependency graph.
  • Changing a cell value triggers recalculation of only the dependent formulas identified by the chain.

The calculation chain is an internal optimization. You do not need to create or manage it in your code - RadSpreadProcessing handles the dependency tracking and recalculation automatically.

Key Benefits

The calculation chain addresses common performance issues when you work with workbooks that contain many complex or interdependent formulas:

  • Optimal recalculation order: Formulas recalculate in topological dependency order, which prevents redundant evaluations and ensures that each formula reads up-to-date input values.
  • Minimal recalculation scope: Only the formulas affected by a change recalculate, instead of re-evaluating every formula in the workbook.
  • Faster import of formula-heavy documents: Documents with large numbers of formulas that reference wide cell ranges import faster because the evaluation is dependency-driven.

Performance Considerations

When you modify cell values or formulas in bulk, use the SuspendLayoutUpdate and ResumeLayoutUpdate methods on the Workbook to avoid triggering layout recalculations on every individual change.

Example 1: Batch-modify cell values with suspended layout updates

C#
Telerik.Windows.Documents.Spreadsheet.Model.Workbook workbook =
    new Telerik.Windows.Documents.Spreadsheet.Model.Workbook();
workbook.Worksheets.Add();

Worksheet worksheet = workbook.ActiveWorksheet;

// Suspend layout updates during batch modifications.
workbook.SuspendLayoutUpdate();

for (int i = 0; i < 1000; i++)
{
    worksheet.Cells[i, 0].SetValue(i);
}

// Resume layout updates after the batch completes.
workbook.ResumeLayoutUpdate();

The SuspendLayoutUpdate method prevents the workbook from recalculating its layout on each cell change. Call ResumeLayoutUpdate after you finish the batch to trigger a single layout pass.

See Also