WD_CELL_VERTICAL_ALIGNMENT
paper-docx 0.2.0 API reference
Alias: WD_ALIGN_VERTICAL
Specifies the vertical alignment of text in one or more cells of a table.
Example::
from docx.enum.table import WD_ALIGN_VERTICAL
table = document.add_table(3, 3) table.cell(0, 0).vertical_alignment = WD_ALIGN_VERTICAL.BOTTOM
MS API name: WdCellVerticalAlignment
https://msdn.microsoft.com/en-us/library/office/ff193345.aspx
Attributes
BOTH
attributeBOTH= (101, 'both', "This is an option in the OpenXml spec, but not in Word itself. It's not clear what Word behavior this setting produces. If you find out please let us know and we'll update this documentation. Otherwise, probably best to avoid this option.")This is an option in the OpenXml spec, but not in Word itself.
It's not clear what Word behavior this setting produces. If you find out please let us know and we'll update this documentation. Otherwise, probably best to avoid this option.
BOTTOM
attributeBOTTOM= (3, 'bottom', 'Text is aligned to the bottom border of the cell.')Text is aligned to the bottom border of the cell.
CENTER
attributeCENTER= (1, 'center', 'Text is aligned to the center of the cell.')Text is aligned to the center of the cell.
TOP
attributeTOP= (0, 'top', 'Text is aligned to the top border of the cell.')Text is aligned to the top border of the cell.
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