mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-28 17:30:24 +01:00
A PivotTable whose cache has cacheSource type="external" (a data connection, or the workbook's Data Model: OLAP caches with saveData="0" and no records) was read as unsupported and dropped on save with its cache, and the Data Model part (xl/model/item.data) was never kept. Such PivotTables are now reported by read_pivots and kept by the pass-through layer like those on another workbook: table, cache and records parts unchanged, original cacheId, style ids renumbered. The connection is looked up in xl/connections.xml to tell the Data Model from a plain connection. The Data Model part is kept byte for byte whenever the workbook's connections are kept. A cache on a connection is kept only with the connections, one on the model only with the model; otherwise its PivotTable is left as plain cells with one warning. Checked in Excel with synthetic workbooks: Excel needs the table, cache, connections.xml and the hidden _xlcn. name of a worksheet connection to open the file, and item.data to refresh it; the x15:dataModel workbook extension is not needed and is not kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>