捕获Excel数据透视表刷新事件 [英] Capture Excel Pivot Table Refresh event

查看:1280
本文介绍了捕获Excel数据透视表刷新事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有与数据透视表的数据刷新相对应的事件?
我找到了

Is there an event corresponding to the data refresh of a pivot table? I have found the

    worksheet_pivottableupdate

事件,但这似乎是每次更改过滤器或操纵pivotottable(这是我的宏相当频繁)调用。我需要的只是为了捕获底层数据的更新。任何方式这样做?

event but this seems to be called everytime I change filters or manipulate the pivottable (which is quite frequently with my macros). What I need is just to capture when the underlying data is updated. Any way to do this?

推荐答案

解决方法之一是使用 pivottableupdate 事件,并将其与检查以下pivot-table属性是否已更改相结合。

One way to tackle this is to use the pivottableupdate event, and combine it with checking that the following pivot-table property has changed.

PivotTables("PivotTable1").RefreshDate

请参阅 http://msdn.microsoft.com/en-us/library/ff834610(v = office.14).aspx 了解有关RefreshDate属性的更多信息。

See http://msdn.microsoft.com/en-us/library/ff834610(v=office.14).aspx for more information on the RefreshDate property.

这篇关于捕获Excel数据透视表刷新事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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