Skip to content

Phase D.12: Table header row repeat on page break #25

@loadfix

Description

@loadfix

Add ability to mark table rows as header rows that repeat on each page. Upstream python-openxml#322 (18 comments).

API Design

  • row.is_header = True — marks the row as a header row
  • row.is_header — read the current state
  • Only works on the first N consecutive rows (Word limitation)

XML

w:trPr > w:tblHeader (presence = True, absence = False)

Implementation

Simple: add/remove the w:tblHeader element on w:trPr.

Files

  • src/docx/table.py — add is_header property to _Row
  • src/docx/oxml/table.py — add tblHeader handling to CT_TrPr

Upstream issue: python-openxml#322

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentTriggers the developer agentenhancementNew feature or requestphase-dQuality of Life

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions