PowerTools SPREAD for ASP.NET 8.0J
NonEmptyColumnCount プロパティ (INonEmptyCells)

データを含む列の数を取得します。
構文
'Declaration
 
ReadOnly Property NonEmptyColumnCount As Integer
int NonEmptyColumnCount {get;}

プロパティ値

空でない列の数を表すInteger
解説
このメソッドは、モデル内でデータを持つ最後の列のインデックスより1大きい値を取得します。
FarPoint.Web.Spread.Model.INonEmptyCells nec; 
Random r = new Random(); 
int countc, countr; 
int i, j; 
for (i = 0; i<=1; i++) 
{ 
     for (j = 0; j<=2; j++) 
          FpSpread1.ActiveSheetView.SetValue(i, j, r.Next(1, 200).ToString()); 
} 
nec = (FarPoint.Web.Spread.Model.INonEmptyCells)FpSpread1.ActiveSheetView.DataModel; 
countc = nec.NonEmptyColumnCount; 
countr = nec.NonEmptyRowCount; 
Response.Write("The number of the first non-empty column is " + countc.ToString() + " and the number of the first non-empty
row is " + countr.ToString());
Dim nec As FarPoint.Web.Spread.Model.INonEmptyCells
Dim r As New Random
Dim i, j As Integer
Dim countc, countr As Integer
For i = 0 To 1
     For j = 0 To 2
          FpSpread1.ActiveSheetView.SetValue(i, j, r.Next(1, 200).ToString())
     Next j
Next i
nec = FpSpread1.ActiveSheetView.DataModel
countc = nec.NonEmptyColumnCount
countr = nec.NonEmptyRowCount
Response.Write("The number of the first non-empty column is " & countc.ToString() & " and the number of the first non-empty
row is " & countr.ToString())
参照

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

 

 


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