如何使用宏刷新我的excel工作簿中的所有数据透视表? [英] How can I refresh all the pivot tables in my excel workbook with a macro?
本文介绍了如何使用宏刷新我的excel工作簿中的所有数据透视表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
是的。
$ b
ThisWorkbook.RefreshAll
或者,如果您的Excel版本足够旧,
将工作表作为工作表,将数据透视表作为数据透视表
对于每个工作表ThisWorkbook.WorkSheets
Sheet.PivotTables中的每个Pivot
Pivot.RefreshTable
Pivot.Update
下一个
下一个
I have a workbook with 20 different pivot tables. Is there any easy way to find all the pivot tables and refresh them in VBA?
解决方案
Yes.
ThisWorkbook.RefreshAll
Or, if your Excel version is old enough,
Dim Sheet as WorkSheet, Pivot as PivotTable
For Each Sheet in ThisWorkbook.WorkSheets
For Each Pivot in Sheet.PivotTables
Pivot.RefreshTable
Pivot.Update
Next
Next
这篇关于如何使用宏刷新我的excel工作簿中的所有数据透视表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文