FpSpread1.Sheets[0].ColumnCount = 10;
FpSpread1.Sheets[0].RowCount = 10;
FpSpread1.Sheets[0].SetClip(0, 0, 8, 1, "CurrencyCellType\n" + "DateTimeCellType\n" + "DoubleCellType\n" + "IntegerCellType\n");
// --------------------------------------------------
// CurrencyCellType, with EditMode format settings
// --------------------------------------------------
FarPoint.Web.Spread.CurrencyCellType cct = new FarPoint.Web.Spread.CurrencyCellType();
cct.NumberFormat = new System.Globalization.NumberFormatInfo();
cct.NumberFormat.CurrencySymbol = "D";
cct.EditMode.NumberFormat = new System.Globalization.NumberFormatInfo();
cct.EditMode.NumberFormat.CurrencySymbol = "VND";
FpSpread1.Sheets[0].Cells[0, 1].CellType = cct;
FpSpread1.Sheets[0].Cells[0, 1].Value = 12;
// --------------------------------------------------
// DateTimeCellType, with EditMode format settings
// --------------------------------------------------
FarPoint.Web.Spread.DateTimeCellType dct = new FarPoint.Web.Spread.DateTimeCellType();
dct.DateTimeFormat = new System.Globalization.DateTimeFormatInfo();
dct.FormatString = "dd/MM/yyyy";
dct.EditMode.DateTimeFormat = new System.Globalization.DateTimeFormatInfo();
dct.EditMode.FormatString = "MM/dd/yyyy";
FpSpread1.Sheets[0].Cells[1, 1].CellType = dct;
FpSpread1.Sheets[0].Cells[1, 1].Value = DateTime.Now.ToShortDateString();
// --------------------------------------------------
// DoubleCellType, with EditMode format settings
// --------------------------------------------------
FarPoint.Web.Spread.DoubleCellType dbct = new FarPoint.Web.Spread.DoubleCellType();
dbct.NumberFormat = new System.Globalization.NumberFormatInfo();
dbct.NumberFormat.NumberDecimalSeparator = ".";
dbct.EditMode.NumberFormat = new System.Globalization.NumberFormatInfo();
dbct.EditMode.NumberFormat.NumberDecimalSeparator = ",";
FpSpread1.Sheets[0].Cells[2, 1].CellType = dbct;
FpSpread1.Sheets[0].Cells[2, 1].Value = 12.1d;
// --------------------------------------------------
// IntegerCellType, with EditMode format settings
// --------------------------------------------------
FarPoint.Web.Spread.IntegerCellType ict = new FarPoint.Web.Spread.IntegerCellType();
ict.NumberFormat = new System.Globalization.NumberFormatInfo();
ict.NumberFormat.NegativeSign = "~";
ict.EditMode.NumberFormat = new System.Globalization.NumberFormatInfo();
ict.EditMode.NumberFormat.NegativeSign = "@";
FpSpread1.Sheets[0].Cells[3, 1].CellType = ict;
FpSpread1.Sheets[0].Cells[3, 1].Value = -12;