Spread Windows Forms 12.0 Product Documentation
Recalculate Method (SheetView)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : Recalculate Method
Evaluates all the formulas in cells on the sheet that have changed since the last calculation cycle.
Syntax
'Declaration
 
Public Sub Recalculate() 
'Usage
 
Dim instance As SheetView
 
instance.Recalculate()
public void Recalculate()
Example
This example recalculates the formulas.
DialogResult dlg;
fpSpread1.ActiveSheet.SetValue(0, 0, 20);
fpSpread1.ActiveSheet.SetValue(0, 1, 10);
fpSpread1.ActiveSheet.SetFormula(3, 0, "SUM(A1,B1)");
dlg = MessageBox.Show("Do you want to recalculate the formula?", "Recalculate", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
    fpSpread1.ActiveSheet.SetValue(0, 1, 100);
    fpSpread1.ActiveSheet.Recalculate();
}
Dim dlg As DialogResult
FpSpread1.ActiveSheet.SetValue(0, 0, 20)
FpSpread1.ActiveSheet.SetValue(0, 1, 10)
FpSpread1.ActiveSheet.SetFormula(3, 0, "SUM(A1,B1)")
dlg = MessageBox.Show("Do you want to recalculate the formula?", "Recalculate", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
    FpSpread1.ActiveSheet.SetValue(0, 1, 100)
    FpSpread1.ActiveSheet.Recalculate()
End If
See Also

Reference

SheetView Class
SheetView Members
ICalculationSupport Interface

User-Task Documentation

Managing Formulas in Cells