Skip to content

Phase D.26: Table autofit and column width control #39

@loadfix

Description

@loadfix

Fix table autofit behavior and improve column width control.

Current issues

API Design

  • table.autofit_behavior — WD_TABLE_AUTOFIT enum (AUTOFIT_TO_WINDOW, AUTOFIT_TO_CONTENTS, FIXED_WIDTH)
  • column.width — Emu value, reliable set/get
  • table.preferred_width — total table width
  • table.allow_autofit — bool

XML

  • w:tblPr > w:tblW (table width, type=auto/dxa/pct)
  • w:tblPr > w:tblLayout w:type='fixed' or 'autofit'
  • w:tcPr > w:tcW (cell width)
  • w:tblPr > w:tblStyleColBandSize, w:tblStyleRowBandSize

Upstream: python-openxml#209 (13 comments), python-openxml#360 (8 comments)

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