FarPoint.Win.Spread アセンブリ > FarPoint.Win.Spread.CellType 名前空間 > ImageCellType クラス : IsValid メソッド |
入力値が有効な場合はTrue、それ以外の場合はFalse
FarPoint.Win.Spread.CellType.DateTimeCellType dt = new FarPoint.Win.Spread.CellType.DateTimeCellType(); bool b; dt.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.ShortDate; dt.MaximumDate = new System.DateTime(2010, 12, 31); dt.MinimumDate = new System.DateTime(1990, 1, 1); fpSpread1.ActiveSheet.Cells[0, 0].CellType = dt; fpSpread1.ActiveSheet.Cells[0, 0].Value = new System.DateTime(2011, 9, 12); fpSpread1.ActiveSheet.Cells[1, 0].CellType = dt; fpSpread1.ActiveSheet.Cells[1, 0].Value = new System.DateTime(1989, 9, 12); b = dt.IsValid(fpSpread1.ActiveSheet.Cells[0, 0].Value); listBox1.Items.Add(b.ToString());
Dim dt As New FarPoint.Win.Spread.CellType.DateTimeCellType() Dim b As Boolean dt.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.ShortDate dt.MaximumDate = New System.DateTime(2010, 12, 31) dt.MinimumDate = New System.DateTime(1990, 1, 1) fpSpread1.ActiveSheet.Cells(0, 0).CellType = dt fpSpread1.ActiveSheet.Cells(0, 0).Value = New System.DateTime(2011, 9, 12) fpSpread1.ActiveSheet.Cells(1, 0).CellType = dt fpSpread1.ActiveSheet.Cells(1, 0).Value = New System.DateTime(1989, 9, 12) b = dt.IsValid(fpSpread1.ActiveSheet.Cells(0, 0).Value) ListBox1.Items.Add(b.ToString())