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 |
---|
privatevoidPage_Load(objectsender,System.EventArgse)
{
FpSpread1.ActiveSheetView.SetValue(0,0,5);
FpSpread1.ActiveSheetView.SetValue(0,1,15);
}
privatevoidA1_Click(objectsender,System.EventArgse)
{
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.A1;
FpSpread1.ActiveSheetView.SetFormula(0,3,"(A1*B1)");
FarPoint.Web.Spread.Model.ReferenceStylerefstyle;
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle;
ListBox1.Items.Add(refstyle.ToString());
}
privatevoidR1C1_Click(objectsender,System.EventArgse)
{
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.R1C1;
FpSpread1.ActiveSheetView.SetFormula(0,3,"(R1C1*R1C2)");
FarPoint.Web.Spread.Model.ReferenceStylerefstyle;
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle;
ListBox1.Items.Add(refstyle.ToString());
} |
Visual Basic | Copy Code |
---|
PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load
FpSpread1.ActiveSheetView.SetValue(0,0,5)
FpSpread1.ActiveSheetView.SetValue(0,1,15)
EndSub
PrivateSubA1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesA1.Click
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.A1
FpSpread1.ActiveSheetView.SetFormula(0,3,"(A1*B1)")
DimrefstyleAsFarPoint.Web.Spread.Model.ReferenceStyle
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle
ListBox1.Items.Add(refstyle.ToString())
EndSub
PrivateSubR1C1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesR1C1.Click
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.R1C1
FpSpread1.ActiveSheetView.SetFormula(0,3,"(R1C1*R1C2)")
DimrefstyleAsFarPoint.Web.Spread.Model.ReferenceStyle
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle
ListBox1.Items.Add(refstyle.ToString())
EndSub |
Inheritance Hierarchy
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also