FarPoint.Win.SpreadJ アセンブリ > FarPoint.Win.Spread.Model 名前空間 > DefaultSheetDataModel クラス : EvaluateExpression メソッド |
'Declaration Public Function EvaluateExpression( _ ByVal row As Integer, _ ByVal column As Integer, _ ByVal expression As Expression _ ) As Object
'使用法 Dim instance As DefaultSheetDataModel Dim row As Integer Dim column As Integer Dim expression As Expression Dim value As Object value = instance.EvaluateExpression(row, column, expression)
public object EvaluateExpression( int row, int column, Expression expression )
FarPoint.CalcEngine.Expression ex; FarPoint.Win.Spread.Model.DefaultSheetDataModel dataModel = new FarPoint.Win.Spread.Model.DefaultSheetDataModel(10, 10); dataModel.AddCustomName("TWICESUM", new FarPoint.CalcEngine.DoubleExpression(10)); dataModel.SetFormula(1, 1, "TWICESUM"); fpSpread1.ActiveSheet.Models.Data = dataModel; ex = dataModel.GetExpression(1, 1); dataModel.EvaluateExpression(1, 1, ex); MessageBox.Show("The expression is " + ex.ToString());
Dim ex As FarPoint.CalcEngine.Expression Dim dataModel As New FarPoint.Win.Spread.Model.DefaultSheetDataModel(10, 10) dataModel.AddCustomName("TWICESUM", New FarPoint.CalcEngine.DoubleExpression(10)) dataModel.SetFormula(1, 1, "TWICESUM") FpSpread1.ActiveSheet.Models.Data = dataModel ex = dataModel.GetExpression(1, 1) dataModel.EvaluateExpression(1, 1, ex) MessageBox.Show("The expression is " & ex.ToString())