FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > GeneralCellType Class : FormatString Property |
'Declaration Public Overridable Property FormatString As String
'Usage Dim instance As GeneralCellType Dim value As String instance.FormatString = value value = instance.FormatString
public virtual string FormatString {get; set;}
The value of a general cell can be a string, a number, or a DateTime object.
The formats supported are the numeric formats and date-time formats in .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
Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional