只显示 ###,###.##的样式可以通过以下代码设置:
- DoubleCellType dct = new DoubleCellType();
- dct.NumberFormat = new System.Globalization.NumberFormatInfo();
- dct.DecimalDigits = 2;
- dct.FixedPoint = true;
- FpSpread1.Cells[0, 0].Value = 321234.56;
- FpSpread1.Cells[0, 0].CellType = dct;
复制代码 |