那你就不要用NumberCellType了。
用GeneralCellType,将NumberFormateInfo设置给NumberFormat属性。- FarPoint.Win.Spread.CellType.GeneralCellType genlcell = new FarPoint.Win.Spread.CellType.GeneralCellType();
- System.Globalization.NumberFormatInfo numform = (System.Globalization.NumberFormatInfo)System.Globalization.NumberFormatInfo.CurrentInfo.Clone();
- numform.CurrencySymbol = "\xA3";
- Decimal myCurrency = new Decimal( 123456 );
- genlcell.NumberFormat = numform;
- genlcell.NegativeRed = true;
- fpSpread1.ActiveSheet.Cells[0, 0].CellType = genlcell;
- fpSpread1.ActiveSheet.Cells[0, 0].Value = myCurrency.ToString( "C", numform );
复制代码 |