Back to Devexpress

Workbook.Calculate() Method

officefileapi-devexpress-dot-spreadsheet-dot-workbook-bc9d9e84.md

latest2.9 KB
Original Source

Workbook.Calculate() Method

Forces recalculation of the workbook.

You need a license for the DevExpress Office File API Subscription or DevExpress Universal Subscription to use this method in production code.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Docs.v25.2.dll

NuGet Package : DevExpress.Document.Processor

Declaration

csharp
public void Calculate()
vb
Public Sub Calculate

Remarks

When the Calculate is called, all workbook modifications are applied and all cells are calculated.

Recalculation of the entire workbook can take a significant amount of time and resources. To calculate only a formula contained in a single cell, use the Workbook.Evaluate method.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Calculate() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

spreadsheet-document-api-examples-part2/CS/SpreadsheetDocServerAPIPart2/CodeExamples/SearchActions.cs#L16

csharp
#region #SimpleSearch
workbook.Calculate();
Worksheet worksheet = workbook.Worksheets["ExpenseReport"];

spreadsheet-document-api-examples-part2/VB/SpreadsheetDocServerAPIPart2/CodeExamples/SearchActions.vb#L13

vb
' #Region "#SimpleSearch"
            workbook.Calculate()
            Dim worksheet As Worksheet = workbook.Worksheets("ExpenseReport")

Implements

Calculate()

See Also

Workbook Class

Workbook Members

DevExpress.Spreadsheet Namespace