Enable or Disable Calculation Engine

Spread.Services Documentation
Enable or Disable Calculation Engine
Collapse All Expand All

Spread.Services Documentation > Developer's Guide > Customize User Interaction > Manage Workbook > Enable or Disable Calculation Engine

Spread.Services offers exceptional computing features with its built-in calculation engine that is capable of performing even the most complex operations on the data in the spreadsheets with complete accuracy and within fraction of seconds. This calculation engine can be integrated with spreadsheets to achieve the desired results. Some of the advantages of using a calculation engine are as follows:

1. Bulk Data analysis: Involves less programming to handle complex spreadsheet calculations and provides the ability to fetch data from cells within the spreadsheets, perform calculations on it and display results for unparalleled data analysis of tons of data.
2. Ease of use: Easy-to-configure calculation engine.
3. Saves Time and Efforts: Pre-defined functions and methods to reduce implementation time and efforts.

### Enable calculation engine

Refer to the following example code to enable calculation engine.

C# | Copy Code
--- | ---

    //enable calc engine.
    worksheet2.Range["A1"].Value = 1;
    worksheet2.Range["A2"].Formula = "=A1";
    workbook.EnableCalculation = true;

    //calc formula when get value. A2's value is 1d.
    var value1 = worksheet2.Range["A2"].Value;

### Disable calculation engine

Refer to the following example code to disable calculation engine.

C# | Copy Code
--- | ---

    //disable calc engine.
    workbook.EnableCalculation = false;
    worksheet.Range["A1"].Value = 1;
    worksheet.Range["A2"].Formula = "=A1";

    //A2's value is 0.
    var value = worksheet.Range["A2"].Value;

See Also
Manage Worksheet

Copyright © GrapeCity, inc. All rights reserved.