Spread for ASP.NET 7.0 Product Documentation
ParseFormula Method
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > DefaultSheetDataModel Class : ParseFormula Method


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

Glossary Item Box

Parses the string value and returns the expression for the cell at the specified row and column.

Syntax

Visual Basic (Declaration) 
Public Function ParseFormula( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal value As String _
) As Expression
Visual Basic (Usage)Copy Code
Dim instance As DefaultSheetDataModel
Dim row As Integer
Dim column As Integer
Dim value As String
Dim value As Expression
 
value = instance.ParseFormula(row, column, value)
C# 
public 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 with parsed formula

Exceptions

ExceptionDescription
ParseException Specified value is not a valid formula

Example

This example parses a formula.
C#Copy Code
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());  
Visual BasicCopy Code
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()) 

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.