SpreadsheetGear Namespace > IWorkbookSet Interface : CalculationOnDemand Property |
Gets or sets the property which determines whether individual cells are calculated on demand. This feature is turned off by default.
[Visual Basic]
Overridable Property CalculationOnDemand As Boolean
[C#]
virtual bool CalculationOnDemand {get; set;}
[C++]
__property virtual bool get_CalculationOnDemand();
__property virtual void set_CalculationOnDemand(
bool value
);
[C++/CLI]
virtual property bool CalculationOnDemand {
bool get();
void set (bool value);
}
Calculation on demand is a feature of SpreadsheetGear for .NET which can dramatically increase performance of some applications. There are four primary strategies for calculating cells in SpreadsheetGear for .NET:
Suppose you have a workbook where you have 100 rows and three columns. Columns A and B have a number, column C adds A + B. If you will be working within one row at a time, changing numbers in columns A and B, and retrieving the result of the formula in column C, calculation on demand will perform very well.
If, on the other hand, you will be making changes in columns A and B, and retrieving many of the cells in column C, turning off calculation on demand may perform better.
If you know that you will need all cells in a workbook set to be calculated, the most efficient strategy is to call Calculate before you start to retrieve the results of formula cells.
CalculationOnDemand has no effect if automatic calculation is not enabled by setting Calculation to Calculation.Automatic.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
IWorkbookSet Interface | IWorkbookSet Members | Calculation Property | BackgroundCalculation Property | Calculate Method | CalculateFull Method | CalculateFullRebuild Method
See our live Excel Reporting, Excel Charting, Excel to DataGrid and Excel Calculation Samples.
Copyright © 2003-2007 SpreadsheetGear LLC. All Rights Reserved.
SpreadsheetGear and Spreadsheet Gear are trademarks of SpreadsheetGear LLC.