- FarPoint.Win.Spread.CellType.DateTimeCellType dt = new FarPoint.Win.Spread.CellType.DateTimeCellType();
- dt.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.UserDefined;
- dt.UserDefinedFormat = "hh:mm";
- dt.MaximumTime = new TimeSpan(23, 59, 59);
- fpSpread1.ActiveSheet.Columns[0].CellType = dt;
- fpSpread1.ActiveSheet.Cells[0,0,30,0].Value = System.DateTime.Now;
- fpSpread1.ActiveSheet.Columns[0].Width = 130;
复制代码 |