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


row
Row index
column
Column index

Glossary Item Box

Gets the formula in the cell at the specified row and column.

Syntax

Visual Basic (Declaration) 
Public Overridable Function GetFormula( _
   ByVal row As Integer, _
   ByVal column As Integer _
) As String
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim row As Integer
Dim column As Integer
Dim value As String
 
value = instance.GetFormula(row, column)
C# 
public virtual string GetFormula( 
   int row,
   int column
)

Parameters

row
Row index
column
Column index

Return Value

String containing the formula in the specified cell or an empty string if no formula is specified

Remarks

For a list of the operators and functions you can use in formulas, refer to the Spread for .NET Formula Reference.

The Spread component can use absolute or relative cell references. You define the cell reference style for the spreadsheet by using the ReferenceStyle property. The formula cannot contain both absolute and relative row or column references.

Example

This example gets the formula that is set for the specified cell.
C#Copy Code
FarPoint.Web.Spread.SheetView sv;
string s;
sv = FpSpread1.ActiveSheetView;
sv.SetFormula(0, 0, "4*4");
s = sv.GetFormula(0, 0);
Response.Write("The formula for the cell is a " + s);
Visual BasicCopy Code
Dim sv As FarPoint.Web.Spread.SheetView
Dim s As String
sv = FpSpread1.ActiveSheetView
sv.SetFormula(0, 0, "4*4")
s = sv.GetFormula(0, 0)
Response.Write("The formula for the cell is a " & 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.