简体   繁体   English

如何在VBA中获取PowerPivot数据?

[英]How to get to PowerPivot data within VBA?

I have my data imported to PowerPivot (based on sql query) table in my workbook. 我将数据导入到工作簿中的PowerPivot(基于sql查询)表中。 I need to copy this data to the worksheet to do some modifications. 我需要将此数据复制到工作表以进行一些修改。 How to accomplish it with VBA? 如何用VBA完成它?

There is no direct API but a workaround is to copy the data into the worksheet and format the data as table then create a "Linked Table" to import the data. 没有直接的API,但是一种解决方法是将数据复制到工作表中并将数据格式化为表格,然后创建“链接表”以导入数据。 The databases PP accesses do have APIs to access them directly from within Excel though. 不过,数据库PP访问确实具有API,可以直接从Excel内部访问它们。

Microsoft Office provides drivers that you can use to retrieve data from the following data sources: Microsoft Office提供了可用于从以下数据源检索数据的驱动程序:

Microsoft SQL Server Analysis Services (OLAP provider) Microsoft Office Access dBASE Microsoft FoxPro Microsoft Office Excel Oracle Paradox Text file databases Microsoft SQL Server Analysis Services(OLAP提供程序)Microsoft Office Access dBASE Microsoft FoxPro Microsoft Office Excel Oracle Paradox文本文件数据库

http://office.microsoft.com/en-us/excel-help/use-microsoft-query-to-retrieve-external-data-HA010099664.aspx http://office.microsoft.com/zh-CN/excel-help/use-microsoft-query-to-retrieve-external-data-HA010099664.aspx

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

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