PowerTools SPREAD for Windows Forms 8.0J
GetCustomNameEnumerator メソッド (ICustomNameSupport)


モデルで定義されているカスタム名を列挙するIEnumeratorを取得します。
構文
'Declaration
 
Function GetCustomNameEnumerator() As IEnumerator
'使用法
 
Dim instance As ICustomNameSupport
Dim value As IEnumerator
 
value = instance.GetCustomNameEnumerator()
IEnumerator GetCustomNameEnumerator()

戻り値の型

カスタム名の列挙子を含む IEnumerator
次のサンプルコードは、カスタム名を列挙します。
System.Collections.IEnumerator se;
FarPoint.Win.Spread.Model.ICustomNameSupport cns;
cns = (FarPoint.Win.Spread.Model.ICustomNameSupport)fpSpread1.ActiveSheet.Models.Data;
cns.AddCustomName("ALPHA", "SUM(A1,A2)", 1, 1);
cns.AddCustomName("GAMMA", "A1*A2", 2, 2);
fpSpread1.ActiveSheet.SetFormula(1, 1, "ALPHA");
fpSpread1.ActiveSheet.SetFormula(2, 2, "GAMMA");
fpSpread1.ActiveSheet.SetValue(0, 0, 10);
fpSpread1.ActiveSheet.SetValue(1, 0, 10);
se = cns.GetCustomNameEnumerator();
listBox1.Items.AddRange(new Object[] {se.MoveNext().ToString(), se.Current.ToString(), se.MoveNext().ToString(), se.Current.ToString()});
Dim se As System.Collections.IEnumerator
Dim cns As FarPoint.Win.Spread.Model.ICustomNameSupport
cns = FpSpread1.ActiveSheet.Models.Data
cns.AddCustomName("ALPHA", "SUM(A1,A2)", 1, 1)
cns.AddCustomName("GAMMA", "A1*A2", 2, 2)
FpSpread1.ActiveSheet.SetFormula(1, 1, "ALPHA")
FpSpread1.ActiveSheet.SetFormula(2, 2, "GAMMA")
FpSpread1.ActiveSheet.SetValue(0, 0, 10)
FpSpread1.ActiveSheet.SetValue(1, 0, 10)
se = cns.GetCustomNameEnumerator()
ListBox1.Items.AddRange(New Object() {se.MoveNext().ToString(), se.Current().ToString(), se.MoveNext().ToString(), se.Current().ToString()})
参照

ICustomNameSupport インタフェース
ICustomNameSupport メンバ

 

 


© 2004-2015, GrapeCity inc. All rights reserved.