openpyxl.preserve.pivots
paper-xlsx 0.2.1 API reference
Resolve pivot names and patch only cache refresh metadata.
parts_referencing_sheet
funcparts_referencing_sheet(wb, sheet_title)Return local pivot-cache parts that may depend on one worksheet.
paramwbparamsheet_titleplan_refresh
funcplan_refresh(zin, parts, plan)Add pivot refresh requests to a package byte plan.
paramzinzipfile.ZipFileOpen workbook package.
parampartsiterable of strPivot cache-definition part names to update.
paramplandictPlanned replacement bytes keyed by part name.
Returns
list of strPart names whose refresh metadata changed.
resolve_requests
funcresolve_requests(wb, pivots=None, *, all=False)Resolve requested pivots to their cache-definition parts.
paramwbopenpyxl.workbook.workbook.WorkbookPreserve-mode workbook containing the pivots.
parampivotsiterable of str | None= NonePivot names, optionally qualified by worksheet name.
paramallbool= FalseSelect every loaded pivot cache instead of named pivots.
Returns
list of strSorted package part names for the selected pivot caches.
snapshot_sources
funcsnapshot_sources(wb)Capture semantic local-source bindings when preservation arms.
paramwbsource_impacts
funcsource_impacts(wb, ledger, *, force_recalculation=False)Return local pivot caches that workbook edits can make stale.
paramwbparamledgerparamforce_recalculation= Falsevalidate_source_freshness
funcvalidate_source_freshness(wb, ledger)Refuse silent stale pivot caches without explicit refresh consent.
paramwbparamledger