Paper Office
paper-xlsxAPI referencepreserve.tables

openpyxl.preserve.tables

paper-xlsx 0.2.1 API reference

Loaded-table mutation, and the table row discipline.

Table parts are fully modeled upstream (Table is Serialisable end to end), so a mutated table re-renders whole from the model — located by displayName in the ORIGINAL sheet rels, never by guessed part numbering. Guards refuse geometry the discipline cannot keep coherent: the header row moves, the data region vanishes, or the column count disagrees with tableColumns.

TABLE_CONTENT_TYPE

attributeTABLE_CONTENT_TYPE
= 'application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml'

append_table_row

funcappend_table_row(ws, table_name, values)

Atomically append one row to a supported named worksheet table.

The operation plans values, calculated columns, styles, totals movement, protection, table geometry, and retained OOXML before changing the model. Unsupported connected, extended, merged, spill, sorted, or ambiguous table states raise a typed refusal and leave the workbook unchanged.

paramwsopenpyxl.worksheet.worksheet.Worksheet

Worksheet containing the table.

paramtable_namestr

Name of the table to expand.

paramvaluesiterable | mapping

Row values as a sequence or column-name mapping.

Returns

None

None.

plan_table_lifecycle

funcplan_table_lifecycle(wb, ws, sheet_part, zin, armed_names, plan, part_plan, names)

Plan table ADD/REMOVE for one sheet: parts via the engine, the sheet's tableParts element rebuilt as crafted bytes (returned; the caller rides them through the region splice). armed_names is the arm-time tuple of table names.

paramwb
paramws
paramsheet_part
paramzin
paramarmed_names
paramplan
parampart_plan
paramnames

plan_table_mutations

funcplan_table_mutations(wb, ws, sheet_part, zin, changed_names, plan, armed_tables=None)

Patch each changed loaded table into its ORIGINAL part.

paramwb
paramws
paramsheet_part
paramzin
paramchanged_names
paramplan
paramarmed_tables
= None

sheet_table_parts

funcsheet_table_parts(zin, sheet_part)

{displayName: (part_name, original_bytes)} for one sheet, resolved through the ORIGINAL rels (producers number table parts arbitrarily — Table.path's id-derived guess is not trustworthy).

paramzin
paramsheet_part

validate_table

funcvalidate_table(tbl, original_ref)

Geometry guards, against the ORIGINAL ref.

paramtbl
paramoriginal_ref

On this page