Evaluates the formulas in the sheet that have changed since the last calculation cycle.
Syntax
Visual Basic (Declaration) | |
---|
Public Sub Recalculate() |
C# | |
---|
public void Recalculate() |
Example
Visual Basic | Copy Code |
---|
Dim dataModel As New FarPoint.Win.Spread.Model.DefaultSheetDataModel(5, 5)
Dim dlg As DialogResult
FpSpread1.ActiveSheet.Models.Data = dataModel
dataModel.SetValue(0, 0, 10)
dataModel.SetValue(1, 0, 20)
dataModel.SetFormula(1, 1, "3*SUM(A1, A2)")
dlg = MessageBox.Show("Do you want to recalculate?", "Recalculate", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
dataModel.SetValue(0, 0, 50)
dataModel.Recalculate()
End If |
C# | Copy Code |
---|
FarPoint.Win.Spread.Model.DefaultSheetDataModel dataModel = new FarPoint.Win.Spread.Model.DefaultSheetDataModel(8, 8);
DialogResult dlg;
fpSpread1.ActiveSheet.Models.Data = dataModel;
dataModel.SetValue(0, 0, 10);
dataModel.SetValue(1, 0, 20);
dataModel.SetFormula(1, 1, "3*SUM(A1, A2)");
dlg = MessageBox.Show("Do you want to recalculate?", "Recalculate", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
dataModel.SetValue(0, 0, 50);
dataModel.Recalculate();
} |
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also