MESCIUS SPREAD for Windows Forms 17.0J
GetCustomNameEnumerator(Boolean) メソッド

このシートのモデルで定義されているカスタム名を列挙するIEnumeratorを取得します。
構文
'Declaration
 
Public Overloads Function GetCustomNameEnumerator( _
   ByVal sheetViewScope As Boolean _
) As IEnumerator
public IEnumerator GetCustomNameEnumerator( 
   bool sheetViewScope
)

パラメータ

sheetViewScope
次のサンプルコードは、GetCustomNameEnumeratorメソッドを使用します。
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()})
参照

SheetView クラス
SheetView メンバ
オーバーロード一覧

 

 


© MESCIUS inc. All rights reserved.