Spread ASP.NET 15
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread.Model Namespace / DefaultSheetDataModel Class / ParseFormula Method
Example


In This Topic
    ParseFormula Method (DefaultSheetDataModel)
    In This Topic
    Parses the string value and returns the expression for the cell at the specified row and column.
    Overload List
    OverloadDescription
    Parses the string value and returns the expression for the cell at the specified row and column.  
    Example
    This example parses a formula.
    FarPoint.Web.Spread.Model.DefaultSheetDataModel dm;
    dm = 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 = dm.ParseFormula(2, 0, "A1+A2"); 
    Response.Write(ex.ToString());  
    
    Dim dm As FarPoint.Web.Spread.Model.DefaultSheetDataModel
    dm = 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 = dm.ParseFormula(2, 0, "A1+A2")
    Response.Write(ex.ToString()) 
    See Also