回复 5楼ewqasdd123的帖子
ewqasdd123 你好,
目前 Spread 没有监听重新计算的功能,可以设置 AutoCalculation 属性为 false,通过 timer 控件设置计算时间,抓取重新计算事件:
- private void Form1_Load(object sender, EventArgs e)
- {
- this.fpSpread1.Sheets[0].AutoCalculation = false;
- this.fpSpread1.Sheets[0].Cells[0, 2].Formula = "SUM(A1:B1)";
- }
- private void timer1_Tick(object sender, EventArgs e)
- {
- this.fpSpread1.Sheets[0].RecalculateAll();
- }
复制代码 |