lud 你好,
可以使用 GeneralCellType 实现该功能,测试代码:
- FarPoint.Web.Spread.GeneralCellType generalCellType1 = new FarPoint.Web.Spread.GeneralCellType();
- generalCellType1.NumberFormat = ((System.Globalization.NumberFormatInfo)(new System.Globalization.CultureInfo("zh-CN", false).NumberFormat.Clone()));
- generalCellType1.NumberFormat.NumberGroupSeparator = ",";
- generalCellType1.NumberFormat.NumberGroupSizes = new int[] { 3 };
- this.FpSpread1.Sheets[0].Cells[0, 0].CellType = generalCellType1;
- this.FpSpread1.Sheets[0].Cells[0, 0].Value = -55123456;
复制代码 |