Spread Windows Forms 9.0 Product Documentation
GetCustomNameEnumerator(Boolean) Method
Example 


Gets an IEnumerator on this sheet that enumerates through the custom names defined in the model.
Syntax
'Declaration
 
Public Overloads Function GetCustomNameEnumerator( _
   ByVal sheetViewScope As Boolean _
) As IEnumerator
'Usage
 
Dim instance As SheetView
Dim sheetViewScope As Boolean
Dim value As IEnumerator
 
value = instance.GetCustomNameEnumerator(sheetViewScope)
public IEnumerator GetCustomNameEnumerator( 
   bool sheetViewScope
)

Parameters

sheetViewScope
Example
This example uses the GetCustomNameEnumerator method.
System.Collections.IEnumerator se;
fpSpread1.ActiveSheet.AddCustomName("TwiceSum", "2*SUM(A1,A2)", 1, 1);
fpSpread1.ActiveSheet.AddCustomName("TwiceProduct", "2*A1*A2", 2, 2);
fpSpread1.ActiveSheet.SetFormula(1, 1, "TwiceSum");
fpSpread1.ActiveSheet.SetFormula(2, 2, "TwiceProduct");
fpSpread1.ActiveSheet.SetValue(0, 0, 10);
fpSpread1.ActiveSheet.SetValue(1, 0, 10);
se = fpSpread1.ActiveSheet.GetCustomNameEnumerator(false);
listBox1.Items.AddRange(new Object[] { se.MoveNext().ToString(), se.Current.ToString(), se.MoveNext().ToString(), se.Current.ToString() });
Dim se As System.Collections.IEnumerator
FpSpread1.ActiveSheet.AddCustomName("TwiceSum", "2*SUM(A1,A2)", 1, 1)
FpSpread1.ActiveSheet.AddCustomName("TwiceProduct", "2*A1*A2", 2, 2)
FpSpread1.ActiveSheet.SetFormula(1, 1, "TwiceSum")
FpSpread1.ActiveSheet.SetFormula(2, 2, "TwiceProduct")
FpSpread1.ActiveSheet.SetValue(0, 0, 10)
FpSpread1.ActiveSheet.SetValue(1, 0, 10)
se = FpSpread1.ActiveSheet.GetCustomNameEnumerator(False)
ListBox1.Items.AddRange(New Object() {se.MoveNext().ToString(), se.Current.ToString(), se.MoveNext().ToString(), se.Current.ToString()})
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

SheetView Class
SheetView Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.