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


row
Row index of the cell
column
Column index of the cell
expression
Expression to be unparsed

Glossary Item Box

Gets the formula, as a string value, from the specified expression for the cell at the specified row and column.

Syntax

Visual Basic (Declaration) 
Public Function UnparseFormula( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal expression As Expression _
) As String
Visual Basic (Usage)Copy Code
Dim instance As DefaultSheetDataModel
Dim row As Integer
Dim column As Integer
Dim expression As Expression
Dim value As String
 
value = instance.UnparseFormula(row, column, expression)
C# 
public string UnparseFormula( 
   int row,
   int column,
   Expression expression
)

Parameters

row
Row index of the cell
column
Column index of the cell
expression
Expression to be unparsed

Return Value

String containing the formula unparsed

Example

This example unparses a formula.
C#Copy Code
FarPoint.Web.Spread.Model.DefaultSheetDataModel dm;
dm = FpSpread1.ActiveSheetView.DataModel;
FarPoint.CalcEngine.Expression ex;
string s;
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"); 
s = dm.UnparseFormula(2, 0, ex); Response.Write(s);
Visual BasicCopy Code
Dim dm As FarPoint.Web.Spread.Model.DefaultSheetDataModel
dm = FpSpread1.ActiveSheetView.DataModel
Dim ex As FarPoint.CalcEngine.Expression
Dim s As String
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") 
s = dm.UnparseFormula(2, 0, ex)
Response.Write(s) 

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.