开发者

Export / copy Access Pivot Table View to Excel 2003?

开发者 https://www.devze.com 2023-01-12 09:35 出处:网络
Is there a way to copy an Access 2003 pivot table view (used to pivot 206,000 record开发者_如何学编程s) to Excel 2003 using VBA?Not sure if number of records matters unless the result exceeds Excel 20

Is there a way to copy an Access 2003 pivot table view (used to pivot 206,000 record开发者_如何学编程s) to Excel 2003 using VBA?


Not sure if number of records matters unless the result exceeds Excel 2003 column and/or row max.

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel11, "qryPivot_Table_Name", "C:\Users\user\Documents\PivotTable.xlsx", True


How about this?

DoCmd.OpenQuery "qryPivot_Table_Name", acViewPivotTable DoCmd.RunCommand AcCommand.acCmdPivotTableExportToExcel

after that you just need to get a reference to the new workboook through Excel.Application object


If all you need is a visible display of the data, such as the totals, Ctrl+C the selected range you want to show, then Shift+Edit+Paste Picture Link. When data is updated it will change the image. I would think you can adapt this to a macro, and generate what you want to distribute, fairly easily.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号