Paper Office
paper-docxAPI referenceenum.table

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 | 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