Creates a new date-time cell with the specified error message.
Syntax
Parameters
- errorMessage
- Message (as string) to display if the input value is not valid
Example
The following example creates a date-time cell with a message to display for invalid data and a custom date format. The date format displays the weekday, a comma, and then the month and day for the specified date. The column width is set to display all the text.
Visual Basic | Copy Code |
---|
Dim datecell As New FarPoint.Web.Spread.DateTimeCellType("Needadate!!")
datecell.FormatString="d"
FpSpread1.Sheets(0).Cells(0,0).CellType=datecell
FpSpread1.Sheets(0).Cells(0,0).Value=System.DateTime.Now.ToOADate()
FpSpread1.Sheets(0).Columns(0).Width=175 |
C# | Copy Code |
---|
FarPoint.Web.Spread.DateTimeCellType datecell=new FarPoint.Web.Spread.DateTimeCellType("Needadate!!");
datecell.FormatString="d";
FpSpread1.Sheets[0].Cells[0,0].CellType=datecell;
FpSpread1.Sheets[0].Cells[0,0].Value=System.DateTime.Now.ToOADate();
FpSpread1.Sheets[0].Columns[0].Width=175; |
Requirements
Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6
See Also