回复 1楼edsoft的帖子
可以使用以下代码测试:
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- this.FpSpread1.ClientAutoCalculation = true;
- this.FpSpread1.Sheets[0].Columns[3].Formula = "IF(B1=0,0,C1/B1)";
- FarPoint.Web.Spread.DoubleCellType dblc = new FarPoint.Web.Spread.DoubleCellType();
- dblc.DecimalDigits = 2;
- dblc.FixedPoint = true;
- FpSpread1.ActiveSheetView.Columns[3].CellType = dblc;
- }
复制代码 |