Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Normally, we recommend that users call Workbook.CalculateFormula() method once and then get the calculated values of the individual cells. But sometimes, users do not want to calculate the entire workbook; they just want to calculate a single cell. Aspose.Cells provides CalculationOptions.Recursive property, which you can set to false, and it will decrease the calculation time of an individual cell significantly. Because when the Recursive property is set to true, all dependent cells are recalculated on each call. When the Recursive property is false, dependent cells are calculated only once and are not recalculated again on subsequent calls.
The following sample code illustrates the usage of CalculationOptions.Recursive property. Please execute this code with the given sample Excel file and check its console output. You will find that setting the Recursive property to false decreases the calculation time significantly. Please also read the comments for a better understanding of this property.
This is the console output of the above sample code when executed with the given sample Excel file on our machine. Please note that your output may differ, but the elapsed time after setting the Recursive property to false will always be less than when it is set to true.
Recursive True: 96 seconds
Recursive False: 42 secondsAnalyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.