See Also

IWorkbookSet Interface  | IWorkbookSet Members

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Language

Visual Basic

C#

C++

C++/CLI

Show All

See Also Languages SpreadsheetGear The Performance Spreadsheet Component Company 

MaxRecursions Property

SpreadsheetGear Namespace > IWorkbookSet Interface : MaxRecursions Property

Gets or sets the maximum number of recursive calculations allowed when references to cells still needing calculation are detected during workbook set calculation.

[Visual Basic]
Overridable Property MaxRecursions As Integer
[C#]
virtual int MaxRecursions {get; set;}
[C++]
__property virtual int get_MaxRecursions(); __property virtual void set_MaxRecursions(    int value );
[C++/CLI]
virtual property int MaxRecursions {    int get();    void set (int value); }

Remarks

Recursion is used when a reference to a cell still needing calculation is detected during workbook set calculation, up to the maximum number of recursions allowed by the MaxRecursions property. When the maximum number of recursions is exceeded, a slower strategy will be employed to calculate these cells.

The default number of recursions allowed is 1024. This is high enough that the vast majority of workbooks will be calculated using recursion, and low enough that stack overflow exceptions are extremely rare (this property was made public two years after SpreadsheetGear for .NET was released in response to the first reported case of a stack overflow exception).

Some workbooks will generate stack overflow exceptions in environments with limited stack size available (such as some ASP.NET implementations which are limited to a stack size of 256K). Setting MaxRecursions to a smaller number will limit the amount of stack space used.

Some complex workbooks will calculate faster with higher MaxRecursions settings.

In most cases, the setting of MaxRecursions will have little or no effect after a workbook set is calculated the first time.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

IWorkbookSet Interface  | IWorkbookSet Members

 

 


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.