FarPoint.Web.Spread 名前空間 > GeneralCellType クラス : FormatString プロパティ |
'Declaration
Public Overridable Property FormatString As String
public virtual string FormatString {get; set;}
標準型セルの値は、文字列、数値、DateTimeオブジェクトのいずれかを設定できます。
サポートされている書式は、.NET Frameworkの数値書式と日付時刻書式です。
System.Globalization.DateTimeFormatInfo dtf = new System.Globalization.DateTimeFormatInfo(); dtf.LongDatePattern = "D"; dtf.ShortDatePattern = "M/d/yyyy"; FarPoint.Web.Spread.GeneralCellType g = new FarPoint.Web.Spread.GeneralCellType(); g.DateTimeFormat = dtf; g.FormatString = dtf.ShortDatePattern FpSpread1.ActiveSheetView.Cells[0, 0].CellType = g; FpSpread1.ActiveSheetView.Cells[0, 0].Value = DateTime.Now;
Dim dtf As New System.Globalization.DateTimeFormatInfo Dim b As Boolean dtf.LongDatePattern = "D" dtf.ShortDatePattern = "M/d/yyyy" Dim g As New FarPoint.Web.Spread.GeneralCellType g.DateTimeFormat = dtf g.FormatString = dtf.ShortDatePattern FpSpread1.ActiveSheetView.Cells(0, 0).CellType = g FpSpread1.ActiveSheetView.Cells(0, 0).Value = DateTime.Now