Hello All,
I am trying to write a program to change the Report Filter in pivot table(s) using Office Open XML SDK and would like to verify if I am on the right track.
According to my research, to change the report filter, I need to make the following changes to PivotTablex.xml:
Remove h attribute from the item node. This node is located under pivotField node where axis attribute is "axisPage". For ex: In the following example the last item is the selected one.
<pivotField axis="axisPage" compact="0" outline="0" subtotalTop="0" showAll="0" includeNewItemsInFilter="1">
<items count="10">
<item h="1" m="1" x="8" />
<item h="1" x="0" />
<item x="1" />
But it also expects another change as well. In PageField node, it expects item attribute to be present (As far as my test goes, the value of item attribute doesn’t matter. )
<pageFields count="1">
<pageField fld="0" item="0" hier="0" />
</pageFields>
Is my understanding correct? If not, what are the other changes I need to make this to work?
Thanks,
Ankush