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
RIGHT
attributeRIGHT= (2, 'right', 'Right-aligned.')Right-aligned.
xml_value
attributexml_valuestr | NoneFunctions
from_xml
funcfrom_xml(xml_value: str | None) -> SelfEnumeration member corresponding to XML attribute value xml_value.
Example::
WD_PARAGRAPH_ALIGNMENT.from_xml("center") WD_PARAGRAPH_ALIGNMENT.CENTER
paramxml_valuestr | NoneReturns
typing_extensions.Selfto_xml
functo_xml(value: int | _T | None) -> str | NoneXML value of this enum member, generally an XML attribute value.
paramvalueint | _T | NoneReturns
str | None