Specifies the reference style in formulas and custom names in the sheet.
Syntax
Visual Basic (Declaration) | |
---|
Public Enum ReferenceStyle
Inherits System.Enum |
Members
Example
This example uses three Command Buttons, each of which uses a different reference style to multiply the values in two cells in the sheet. The type of reference style used is returned to a list box.
C# | Copy Code |
---|
private void Page_Load(object sender,System.EventArgs e)
{
FpSpread1.ActiveSheetView.SetValue(0,0,5);
FpSpread1.ActiveSheetView.SetValue(0,1,15);
}
private void A1_Click(object sender,System.EventArgs e)
{
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.A1;
FpSpread1.ActiveSheetView.SetFormula(0,3,"(A1*B1)");
FarPoint.Web.Spread.Model.ReferenceStyle refstyle;
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle;
ListBox1.Items.Add(refstyle.ToString());
}
private void R1C1_Click(object sender,System.EventArgs e)
{
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.R1C1;
FpSpread1.ActiveSheetView.SetFormula(0,3,"(R1C1*R1C2)");
FarPoint.Web.Spread.Model.ReferenceStyle refstyle;
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle;
ListBox1.Items.Add(refstyle.ToString());
} |
Visual Basic | Copy Code |
---|
Private Sub Page_Load(ByVal sender As System.Object,ByVal e AsSystem.EventArgs)Handles MyBase.Load
FpSpread1.ActiveSheetView.SetValue(0,0,5)
FpSpread1.ActiveSheetView.SetValue(0,1,15)
End Sub
Private Sub A1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles A1.Click
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.A1
FpSpread1.ActiveSheetView.SetFormula(0,3,"(A1*B1)")
Dim refstyle As FarPoint.Web.Spread.Model.ReferenceStyle
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle
ListBox1.Items.Add(refstyle.ToString())
End Sub
Private Sub R1C1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles R1C1.Click
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.R1C1
FpSpread1.ActiveSheetView.SetFormula(0,3,"(R1C1*R1C2)")
Dim refstyle As FarPoint.Web.Spread.Model.ReferenceStyle
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle
ListBox1.Items.Add(refstyle.ToString())
End Sub |
Inheritance Hierarchy
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