Spread Windows Forms 8.0 Product Documentation
GetExpression Method (DefaultSheetDataModel)
Example 


Row index of the cell
Column index of the cell
Gets the formula, as an expression value, for the cell of the specified row and column.
Syntax
'Declaration
 
Public Overridable Function GetExpression( _
   ByVal row As Integer, _
   ByVal column As Integer _
) As Expression
'Usage
 
Dim instance As DefaultSheetDataModel
Dim row As Integer
Dim column As Integer
Dim value As Expression
 
value = instance.GetExpression(row, column)
public virtual Expression GetExpression( 
   int row,
   int column
)

Parameters

row
Row index of the cell
column
Column index of the cell

Return Value

Expression containing the formula
Remarks

This method returns the formula as an expression; to return the formula as a string, refer to the GetFormula method.

For more information on formulas, refer to the Formula Reference.

Example
This example returns the formula (as an expression) for the specified row and column.
FarPoint.Win.Spread.Model.DefaultSheetDataModel dataModel = new FarPoint.Win.Spread.Model.DefaultSheetDataModel(5, 5);
object o;
fpSpread1.ActiveSheet.Models.Data = dataModel;
dataModel.SetValue(0, 0, 10);
dataModel.SetValue(1, 0, 20);
dataModel.SetFormula(0, 0, "3*SUM(A1, A2)");
o = dataModel.GetFormula(0, 0);
listBox1.Items.Add(o.ToString());
Dim dataModel As New FarPoint.Win.Spread.Model.DefaultSheetDataModel(5, 5)
Dim o As Object
FpSpread1.ActiveSheet.Models.Data = dataModel
dataModel.SetValue(0, 0, 10)
dataModel.SetValue(1, 0, 20)
dataModel.SetFormula(0, 0, "3*SUM(A1, A2)")
o = dataModel.GetFormula(0, 0)
ListBox1.Items.Add(o.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

Reference

DefaultSheetDataModel Class
DefaultSheetDataModel Members

 

 


Copyright © GrapeCity, inc. All rights reserved.