回复 4楼xiaoyanwei2000的帖子
你那边是否测试成功?
我的测试代码:
- public partial class WebForm1 : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- this.FpSpread1.Sheets[0].Cells[1, 1].Formula = "C2+" + (getRadom()*0.3).ToString();
- this.FpSpread1.ClientAutoCalculation = true;
- }
- protected int getRadom()
- {
- Random rd = new Random();
- int test = rd.Next(10, 500);
- return test;
- }
- }
复制代码 |