回复 1楼xiaobowen的帖子
请使用 DoubleCellType 来实现这个功能:
- protected void Button1_Click(object sender, EventArgs e)
- {
- FarPoint.Web.Spread.DoubleCellType g = new FarPoint.Web.Spread.DoubleCellType();
- System.Globalization.NumberFormatInfo nfi = new System.Globalization.NumberFormatInfo();
- nfi.NumberDecimalDigits = 3;
- g.NumberFormat = nfi;
- FpSpread1.ActiveSheetView.Cells[0, 0].CellType = g;
- FpSpread1.ActiveSheetView.Cells[0, 0].Text = "234.56";
- }
复制代码 |