Paper Office
paper-docxAPI referenceenum.table

WD_TABLE_ALIGNMENT

paper-docx 0.2.0 API reference

Specifies table justification type.

Example::

from docx.enum.table import WD_TABLE_ALIGNMENT

table = document.add_table(3, 3) table.alignment = WD_TABLE_ALIGNMENT.CENTER

MS API name: WdRowAlignment

http://office.microsoft.com/en-us/word-help/HV080607259.aspx

Attributes

CENTER

attributeCENTER
= (1, 'center', 'Center-aligned.')

Center-aligned.

LEFT

attributeLEFT
= (0, 'left', 'Left-aligned')

Left-aligned

attributeRIGHT
= (2, 'right', 'Right-aligned.')

Right-aligned.

xml_value

attributexml_valuestr | None

Functions

from_xml

funcfrom_xml(xml_value: str | None) -> Self

Enumeration member corresponding to XML attribute value xml_value.

Example::

WD_PARAGRAPH_ALIGNMENT.from_xml("center") WD_PARAGRAPH_ALIGNMENT.CENTER

paramxml_valuestr | None

Returns

typing_extensions.Self

to_xml

functo_xml(value: int | _T | None) -> str | None

XML value of this enum member, generally an XML attribute value.

paramvalueint | _T | None

Returns

str | None

On this page