简体   繁体   English

在没有powerpivot的excel版本中,可以用宏刷新powerpivot表吗?

[英]Is it posible to refresh a powerpivot table with a macro in a version of excel without powerpivot?

I now that this is more of a license question than a programming question but I couldnt find the answer anywhere. 现在,我的问题更多是许可证问题,而不是编程问题,但是我在任何地方都找不到答案。

I have made a powerpivot workbook which I send around amongst colleagues but some of them can't refresh the data and I can't find why. 我制作了一份powerpivot工作簿,并在同事之间发送,但是其中一些无法刷新数据,我也找不到原因。 Is it possible that they need a version of excel 2013 which supports powerpivot? 他们是否可能需要支持powerpivot的excel 2013版本? Otherwise the workbooks work well for them, ie they can use the slicers and trim down the data and look at the graphs an so on. 否则,工作簿将对其很好地工作,即,他们可以使用切片器并修剪数据并查看图形,依此类推。

The macro which refreshes the data is: 刷新数据的宏是:

ActiveSheet.PivotTables("table name").PivotCache.refresh

If it is a problem with the macro, can I do the refresh in a different way? 如果宏有问题,我可以用其他方式刷新吗?

We managed to solve it by changing provider, now colleagues without powerpivot can refresh the data with my macro. 我们设法通过更改提供程序来解决此问题,现在没有powerpivot的同事可以使用我的宏刷新数据。

We changed to the "Microsoft OLE DB Provider for SQL Server" provider. 我们更改为“ SQL Server的Microsoft OLE DB提供程序”提供程序。

You can change the provider under Powerpivot-> Manage-> Existing connections -> Edit -> Advanced and then choose the right provider in the "Providers" dropdown list. 您可以在Powerpivot->管理->现有连接->编辑->高级下更改提供程序,然后在“提供程序”下拉列表中选择正确的提供程序。

Your Excel 2013 users need to activate the PowerPivot COM add-in in their Excel installations, before they can use the PowerPivot features (including refresh from VBA). Excel 2013用户必须先在其Excel安装中激活PowerPivot COM加载项,然后才能使用PowerPivot功能(包括从VBA刷新)。

To activate it, go to File -> Options -> Add-ins -> Choose "COM add-ins" from the dropdown and click "Go...", then check the "PowerPivot for Excel"-box. 要激活它,请转到文件->选项->加载项->从下拉列表中选择“ COM加载项”,然后单击“转到...”,然后选中“ PowerPivot for Excel”框。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM