如何在 Excel 2010 中为切片器的每个值打印图表?
在描述问题之前,这里是我正在使用的技术列表 - Excel 2010、PowerPivot 插件、Win 7、宏 - VBA
我已经使用多个数据源(通过 PowerPivot)创建了图表。 PowerPivot 提供了切片器,我想打印图表的各种状态,以将切片器的每个值分开为 PDF。我已经编写了执行打印工作的代码。我需要一段代码的帮助来循环切片器列表并以图表状态每次都会改变的方式选择它们。
通过我的研究,我发现有一个名为 SlicerItem.Selected 的属性,可以将其设置为 TRUE 或 FALSE 以选择切片器中的特定项目。但显然我们可以为 OLAP 数据透视表/图表设置此属性。
任何帮助表示赞赏。
谢谢, 鲁沙布。
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 SlicerItem.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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果将切片器转换为报表筛选器,则可以利用 Excel 的“显示报表筛选器页面”内置功能
。转到 PowerPivot 功能区、选项选项卡、选项。您将看到该项目显示报告过滤器页面。它将为每个报告过滤器选择创建多个工作表。
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.