A pivot table, xl/pivotTables/pivotTable{n}.xml. The rowItems and colItems
layout caches and pivotTableStyleInfo are dropped on read.
The writer does not compute the table's layout or its cell values. For a table built
in code (a row, column or page field with empty items), it completes the items (see
PivotFieldData.items) and writes refreshOnLoad="1" on the cache the table
uses, so Excel lays the table out and shows its values when it opens the file (and
marks the workbook changed). Read back, the table has those items, so its cache is
written without refreshOnLoad: the table shows the values in its cells, which Excel
saves with the file, and a file no Excel has saved shows them after a refresh.
On write, pivotFields gets empty fields up to the number of fields in the cache that
cacheId names, because Excel refuses a table with fewer; the model is not changed.
A pivot table,
xl/pivotTables/pivotTable{n}.xml. TherowItemsandcolItemslayout caches andpivotTableStyleInfoare dropped on read.The writer does not compute the table's layout or its cell values. For a table built in code (a row, column or page field with empty
items), it completes the items (see PivotFieldData.items) and writesrefreshOnLoad="1"on the cache the table uses, so Excel lays the table out and shows its values when it opens the file (and marks the workbook changed). Read back, the table has those items, so its cache is written withoutrefreshOnLoad: the table shows the values in its cells, which Excel saves with the file, and a file no Excel has saved shows them after a refresh.On write,
pivotFieldsgets empty fields up to the number of fields in the cache thatcacheIdnames, because Excel refuses a table with fewer; the model is not changed.