The structure is actually quite convoluted, and involves multiple
components of the Zip structure, connected by relationship IDs (rId
attributes, _rels files):

Workbook.xml
Sheet#.xml
PivotTable#.xml
PivotCacheDefinition#.xml
PivotCacheRecords#.xml

If cell data is modified the corresponding PivotCacheRecords file needs to
be updated as well.  If the definition is changed (selecting different
metrics, etc.) again the cache needs to be rebuilt/updated.  Changing the
definition can (and most likely will) change the PivotTable area reference.

Excel has a ton of management code and functionality around keeping all
these in sync as the user makes changes.  POI has none of that yet.

On Wed, Mar 21, 2018 at 1:33 PM Blake Watson <blake.wat...@pnmac.com> wrote:

> The CT for a (simple) pivot table section seems simple enough. I'm seeing
> this part, though, which I believe is for the data source:
>
> <main:location firstDataCol=\"1\" firstDataRow=\"2\" firstHeaderRow=\"1\"
> ref=\"A3:D7\"/>
>
> ​
> ​firstDataCol and firstDataRow (with firstHeaderRow) are the source, and
> ​A3:D7 is the target. The A3:D7 sheet is the one I pulled the CT from. I
> don't see where firstDataCol, firstDataRow and firstHeaderRow are mapped to
> a specific sheet!
>
> ===Blake===
>

Reply via email to