回复 1楼婧友的帖子
可以使用 IntegerCellType 实现,测试代码如下:
- protected void Page_Load(object sender, EventArgs e)
- {
- FarPoint.Web.Spread.IntegerCellType g = new FarPoint.Web.Spread.IntegerCellType();
- System.Globalization.NumberFormatInfo nfi = new System.Globalization.NumberFormatInfo();
- nfi.NumberDecimalDigits = 3;
- nfi.NumberDecimalSeparator = ",";
- nfi.NumberDecimalDigits = 0;
- g.NumberFormat = nfi;
- FpSpread1.ActiveSheetView.Cells[0, 0].CellType = g;
- FpSpread1.ActiveSheetView.Cells[0, 0].Value = 1123456;
- }
复制代码 |