MS Excel - Pivot Table - Accessing the source data when it isn't a tab in the spreadsheet

放肆的年华 提交于 2019-12-24 10:03:28

问题


I have a spreadsheet that is emailed to me by an outside vender. It contains a bunch of pivot tables. I really couldn't care less about the pivot tables, I just want the underlying data. The data comes from a sql server that I don't have access to, but the data is stored within the spreadsheet. Is there anyway that I can access the data, (I think it's the PivotCache) directly without drilling into one of the pivot tables?

I'd love some sort of ODBC/ADO.Net command that I can use from SSIS. But am open to just about anything that doens't require me to open and save the workbook.

I'd also like to avoid macros if at all possible.


回答1:


Here's the answer. Or at least what I did to resolve my problem.

There is really no way to accss the underlying PivotCache data except via pivot tables. So direct accss was out. I ended up using a script task with excel ole to dynamically create a pivot table with the data I needed at run time. Once the script task is done, I then use the new pivot table as my dataflow source. Excel can be a little tricky to automate, but it's worth it.



来源:https://stackoverflow.com/questions/6748584/ms-excel-pivot-table-accessing-the-source-data-when-it-isnt-a-tab-in-the-sp

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