How to Print a Chart in Excel 2010 for every value of a Slicer?
Before I give a description of the problem, here is the list of technologies I am using - Excel 2010, PowerPivot Add-in, Win 7, Macros - VBA
I have created charts using multiple data sources (via PowerPivot). PowerPivot has provided Slicers and I want to print various states of the chart to separate PDFs for each value of the Slicer. I have already written the code that does the printing job. I need help with a snippet of code to loop through the list of Slicers and select them in such a way that the state of the chart changes everytime.
Through my research I found out that there is a property named Slice开发者_如何学编程rItem.Selected which can be set to TRUE or FALSE to select a particular item in the Slicer. But apparently we can Set this property for OLAP pivot table/chart.
Any help is appreciated.
Thanks, Rushabh.
If you convert your slicer to a report filter, then you can utilize Excel's builtin-feature of "show report filter pages"
Go to PowerPivot ribbon, option tab, Options. You'll see the item show report filter pages. It will create multiple worhsheets for each report filter selection.
精彩评论