MESCIUS SPREAD for Windows Forms 17.0J
RecalculateAll メソッド (ICalculationSupport)

シート内のすべての数式(最後の計算サイクル以降に変更されていない数式を含む)を評価します。
構文
'Declaration
 
Sub RecalculateAll() 
void RecalculateAll()
次のサンプルコードは、最後の計算サイクル以降に変更されたかどうかにかかわらず、シート内のすべての数式を再計算します。
DialogResult dlg;
FarPoint.Win.Spread.Model.ICalculationSupport cs;
fpSpread1.ActiveSheet.SetValue(0, 0, 20);
fpSpread1.ActiveSheet.SetValue(0, 1, 10);
fpSpread1.ActiveSheet.SetFormula(3, 0, "SUM(A1,B1)");
fpSpread1.ActiveSheet.SetFormula(4, 0, "A1*B1");
dlg = MessageBox.Show("Do you want to recalculate the formula?", "Recalculate", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
     fpSpread1.ActiveSheet.AutoCalculation = false;
     fpSpread1.ActiveSheet.SetValue(0, 1, 100);
     cs = (FarPoint.Win.Spread.Model.ICalculationSupport)fpSpread1.ActiveSheet.Models.Data;
     cs.RecalculateAll();
}
Dim dlg As DialogResult
Dim cs As FarPoint.Win.Spread.Model.ICalculationSupport
FpSpread1.ActiveSheet.SetValue(0, 0, 20)
FpSpread1.ActiveSheet.SetValue(0, 1, 10)
FpSpread1.ActiveSheet.SetFormula(3, 0, "SUM(A1,B1)")
FpSpread1.ActiveSheet.SetFormula(4, 0, "A1*B1")
dlg = MessageBox.Show("Do you want to recalculate the formulas?", "RecalculateAll", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
     FpSpread1.ActiveSheet.AutoCalculation = False
     FpSpread1.ActiveSheet.SetValue(0, 1, 100)
     cs = FpSpread1.ActiveSheet.Models.Data
     cs.RecalculateAll()
End If
参照

ICalculationSupport インタフェース
ICalculationSupport メンバ

 

 


© MESCIUS inc. All rights reserved.