Evaluates the expression in the cell at the specified row and column and returns the resulting object.
Syntax
Parameters
- row
- Row index of the base cell
- column
- Column index of the base cell
- expression
- Expression to be evaluated
Return Value
Object containing the evaluated expression
Example
This example evaluates the expression and returns the object.
C# | Copy Code |
---|
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()); |
Visual Basic | Copy Code |
---|
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()) |
Requirements
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8
See Also