ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reading PivotCache for Pivot Table (https://www.excelbanter.com/excel-programming/288712-reading-pivotcache-pivot-table.html)

Adam[_9_]

Reading PivotCache for Pivot Table
 
A colleague has deleted the underlying data for a Pivot
Table. I was hoping to retrieve the original data from the
PivotCache using code like this:

Dim MyPC As PivotCache

Set MyPC = ActiveWorkbook.PivotCaches(1)

'Write the recordset
Range("A10").Offset(1, 0).CopyFromRecordset
MyPC.Recordset

When run, this code generates an "Application-defined or
Object-defined error". Is it possible to read the
PivotCache underlying a Pivot Table?


All times are GMT +1. The time now is 06:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com