Spread for ASP.NET 8.0 Product Documentation
ReferenceStyle Enumeration
Example Example 


Specifies the reference style in formulas and custom names in the sheet.
Syntax
'Declaration
 
Public Enum ReferenceStyle 
   Inherits System.Enum
'Usage
 
Dim instance As ReferenceStyle
public enum ReferenceStyle : System.Enum 
Members
MemberDescription
A1Uses letters and numbers for column and row coordinates; uses dollar sign ($) for absolute coordinates
R1C1Uses "R" and number for row, "C" and number for column coordinates; uses brackets [ ] for relative coordinates
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.
private void Page_Load(object sender,System.EventArgs e)
{
FpSpread1.ActiveSheetView.SetValue(0,0,5);
FpSpread1.ActiveSheetView.SetValue(0,1,15);
}

private voidA1_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 voidR1C1_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());
}
Private Sub Page_Load(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles MyBase.Load
FpSpread1.ActiveSheetView.SetValue(0,0,5)
FpSpread1.ActiveSheetView.SetValue(0,1,15)
End Sub

Private SubA1_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 SubR1C1_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

System.Object
   System.ValueType
      System.Enum
         FarPoint.Web.Spread.Model.ReferenceStyle

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

Reference

FarPoint.Web.Spread.Model Namespace
ReferenceStyle Property

User-Task Documentation

Specifying a Cell Reference Style in a Formula

 

 


Copyright © GrapeCity, inc. All rights reserved.