MESCIUS SPREAD for ASP.NET 10.0J サンプルコード集
セル型を確認する

SheetViewクラスのGetCellTypeメソッドで、指定したセルのセル型を取得できます。

protected void Button1_Click(object sender, EventArgs e)
{
    //Cell[0,1]がコンボボックス型か調べます
    if(FpSpread1.Sheets[0].GetCellType(0,1) is ComboBoxCellType)
    {
        System.Diagnostics.Debug.WriteLine("Cell[0,1]はコンボボックス型セルです");
    }
}
Protected Sub Button1_Click(sender As Object, e As EventArgs)
    'Cell[0,1]がコンボボックス型か調べます
    If TypeOf FpSpread1.Sheets(0).GetCellType(0, 1) Is ComboBoxCellType Then
        System.Diagnostics.Debug.WriteLine("Cell[0,1]はコンボボックス型セルです")
    End If
End Sub

 

 


© MESCIUS inc. All rights reserved.