Spread for ASP.NET 11 Product Documentation
ParseFormula Method (IExpressionSupport2)
Example 


FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > IExpressionSupport2 Interface : ParseFormula Method
Row index of the cell
Column index of the cell
Formula to be parsed to a string
Parses the string value and returns the expression for the cell at the specified row and column.
Syntax
'Declaration
 
Function ParseFormula( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal value As String _
) As Expression
'Usage
 
Dim instance As IExpressionSupport2
Dim row As Integer
Dim column As Integer
Dim value As String
Dim value As Expression
 
value = instance.ParseFormula(row, column, value)
Expression ParseFormula( 
   int row,
   int column,
   string value
)

Parameters

row
Row index of the cell
column
Column index of the cell
value
Formula to be parsed to a string

Return Value

Expression containing the parsed formula
Exceptions
ExceptionDescription
Value is not a valid formula.
Example
This example parses a formula.
FarPoint.Web.Spread.Model.IExpressionSupport2 es;
es = FpSpread1.ActiveSheetView.DataModel;
FarPoint.CalcEngine.Expression ex; FpSpread1.ActiveSheetView.Cells[0, 0].Value = 10; 
FpSpread1.ActiveSheetView.Cells[1, 0].Value = 10; 
FpSpread1.ActiveSheetView.Cells[2, 0].Formula = "A1 + A2"; 
ex = es.ParseFormula(2, 0, "A1+A2"); 
Response.Write(ex.ToString());  
Dim es As FarPoint.Web.Spread.Model.IExpressionSupport2
es = FpSpread1.ActiveSheetView.DataModel
Dim ex As FarPoint.CalcEngine.Expression FpSpread1.ActiveSheetView.Cells(0, 0).Value = 10 
FpSpread1.ActiveSheetView.Cells(1, 0).Value = 10 
FpSpread1.ActiveSheetView.Cells(2, 0).Formula = "A1 + A2" 
ex = es.ParseFormula(2, 0, "A1+A2")
Response.Write(ex.ToString()) 
See Also

Reference

IExpressionSupport2 Interface
IExpressionSupport2 Members