回复 7楼pinglan7的帖子
感谢你的问题反馈。
我通过以下代码使用 Spread 8.0 测试的结果是,如果除数中包含公式则无法删除其值,删除被除数计算公式会自动计算,请问您的具体使用方式是什么?
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- this.FpSpread1.ActiveSheetView.ColumnCount = 6;
- this.FpSpread1.ActiveSheetView.ColumnHeader.Cells[0, 0].Text = "地块面积";
- this.FpSpread1.ActiveSheetView.ColumnHeader.Cells[0, 1].Text = "容积率";
- this.FpSpread1.ActiveSheetView.ColumnHeader.Cells[0, 2].Text = "计容面积";
- this.FpSpread1.ActiveSheetView.Cells[0, 0].Text = "2";
- this.FpSpread1.ActiveSheetView.Cells[0, 2].Text = "4";
- this.FpSpread1.ActiveSheetView.Cells[0, 4].Text = "4";
- this.FpSpread1.ActiveSheetView.Cells[0, 5].Text = "4";
- this.FpSpread1.ActiveSheetView.Columns[0].Formula = "SUM(E1:F1)";
- this.FpSpread1.ActiveSheetView.Columns[1].Formula = "ROUND(C1/A1,2)";
- this.FpSpread1.ClientAutoCalculation = true;
- }
复制代码
需要注意的是设置 ClientAutoCalculation 为 true,在客户端才能自动计算。
谢谢 |