WInfrom C#代码
- FarPoint.Web.Spread.Model.DefaultSheetDataModel dm;
- dm = FpSpread1.ActiveSheetView.DataModel;
- FarPoint.CalcEngine.Expression ex;
- object o;
- FpSpread1.ActiveSheetView.Cells[0, 0].Value = 10;
- FpSpread1.ActiveSheetView.Cells[1, 0].Value = 10;
- FpSpread1.ActiveSheetView.Cells[2, 0].Formula = "A1 + A2";
- ex = dm.ParseFormula(2, 0, "A1+A2");
- o = dm.EvaluateExpression(2, 0, ex); Response.Write(o.ToString());
复制代码 |