回复 1楼zhou_sir的帖子
可以导入 Excel 之后,存储 Formula,使用时再重新设置。设置方法:
- string formula = "";
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- this.FpSpread1.OpenExcel(System.Web.HttpContext.Current.Server.MapPath( "test.xlsx"));
- string formula = this.FpSpread1.Sheets[0].Cells[2, 0].Formula;
- this.FpSpread1.Sheets[0].Cells[2, 0].ResetFormula();
- this.FpSpread1.Sheets[0].Cells[2, 0].ResetText();
- }
复制代码 |