Refresh Power Pivot Window

丶灬走出姿态 提交于 2019-12-08 03:32:58

问题


How to automatically Refresh Power Pivot Window when i open excel file , without going the Power Pivot Window option in power pivot tab?


回答1:


Vinoth,

It is possible to write VBA that triggers a 'refresh all' by placing the code in the Workbook module and using the Open_Event to trigger it as the workbook is opened.

If you are using 2010 then you will need to use this highly innovative technique developed by a guy called Tom Gleeson.

If you are using 2013 then things become more straightforward as the data model is formally exposed to VBA. There are several resources out there including this.

HTH Jacob




回答2:


There is a Refresh All button in the PowerPivot tab that you can use for this purpose. This avoids having to open the PowerPivot window just for refresh.

A caveat though: From what I remember, this just updates the tables which are linked from your current Excel workbook - for other types of connection, you have to go to PowerPivot window and refresh the respective tables.

Here is some information I found on a solution for your issue in Excel 2013: http://www.vandeputte.org/2012/07/powerpivot-nuggets-part-18-automate.html




回答3:


From Excel (not Power Pivot Manager), open:

  • Data
  • Connections
  • Connections

Then, select your data source and click Properties. You should see a checkbox for refreshing the data when the file is opened.




回答4:


You can also right click on any Power Pivot chart or tables and click PivotTable Option... and than under data you can select Refresh data when opening the file




回答5:


Excel 2013 allows for complete data model refresh through VBA. I added a button on my dashboard and assigned the following macro:

Sub Refresh()

ActiveWorkbook.Model.Refresh

End Sub

-Melissa




回答6:


This is an Excel 2010 specific issue. In Excel 2013 and later the Refresh icon on the Excel ribbon does what you'd expect it to. In Excel 2010 however linked tables, the data model and pivot tables/charts aren't refreshed by the Refresh icon.

We have a solution much better and simpler than the one Tom Gleeson describes https://ukanexcel.wordpress.com/2016/11/30/refreshing-power-pivot-in-excel-2010/



来源:https://stackoverflow.com/questions/15835109/refresh-power-pivot-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!