以编程方式在Excel工作表中进行计算 [英] Calculations in Excel sheet programmatically

查看:166
本文介绍了以编程方式在Excel工作表中进行计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我编写了SheetCalculateEventHandler 事件以触发Excel中的重新计算.

当Excel工作表中的公式发生更改时,函数SheetCalculateEventHandler(对象Sh)会触发.

我的目的是从Sh对象读取函数结果.
例如,如果A1 = 50,A2 = 40和A3 = SUM(A1,A2).现在我将A1 = 17更改为现在的I A3.A3是Related E4 = A3.Now值也已更改,因为我们为那我能够捕获A3的值.
但是我想抓住E4的价值.

如果有人有任何想法,请引导我获取价值.

提前谢谢.
S.ARAVAIND

Hi,

I''ve written the SheetCalculateEventHandler event to trigger for recalculation in Excel.

The function SheetCalculateEventHandler (object Sh) triggers when there is a formula change in the excel sheet.

My aim is to read the function result from the Sh object.
for example, if A1=50, A2=40 and A3=SUM(A1,A2).Now I change the A1=17 so now I A3 .The A3 is Related E4=A3.Now value also changed because we write function for that.I am able to trap the value of A3.
But I want to capture the value of E4.

If anybody have any idea then please guide me to get the value.

Thanks in advance.
S.ARAVAIND

推荐答案

在选项"对话框中,您可以关闭Excel的自动计算,并在触发公式更改事件时以编程方式触发它.我有一个仅在执行保存时才会调用,因为它需要大量计算.
In the Options dialog, you can turn off auto-calculation for Excel and have it triggered programmatically when your formula changed event gets triggered. I have one that only gets called whenever I do a save since it is calculation intensive.


这篇关于以编程方式在Excel工作表中进行计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆