GrapeCity SPREAD for Windows Forms 11.0J
IsDateFormat プロパティ (GeneralCellType)


書式文字列を日付時刻書式として(True)解釈するか、 数値書式として(False)解釈するかを取得または設定します。
構文
'Declaration
 
Public Property IsDateFormat As Boolean
'使用法
 
Dim instance As GeneralCellType
Dim value As Boolean
 
instance.IsDateFormat = value
 
value = instance.IsDateFormat
public bool IsDateFormat {get; set;}

プロパティ値

Boolean:値を日付時刻値として取り扱う必要がある場合は True、それ以外の場合は False

次のサンプルコードは、日付値の書式設定に使用する書式文字列を指定します。

FarPoint.Win.Spread.CellType.GeneralCellType genlcell = new FarPoint.Win.Spread.CellType.GeneralCellType();
System.Globalization.DateTimeFormatInfo dtinfo; 
dtinfo = System.Globalization.DateTimeFormatInfo.CurrentInfo;
genlcell.DateTimeFormat = dtinfo;
fpSpread1.ActiveSheet.Cells[0, 0].CellType = genlcell;
fpSpread1.ActiveSheet.Cells[0, 0].Value = DateTime.Now;
Dim genlcell As New FarPoint.Win.Spread.CellType.GeneralCellType()
Dim dtinfo As New System.Globalization.DateTimeFormatInfo()
genlcell.DateTimeFormat = dtinfo.CurrentInfo
FpSpread1.ActiveSheet.Cells(0, 0).CellType = genlcell
FpSpread1.ActiveSheet.Cells(0, 0).Value = DateTime.Now
参照

GeneralCellType クラス
GeneralCellType メンバ

 

 


© 2004-2018, GrapeCity Inc. All rights reserved.