CT_TblPr
paper-docx 0.2.0 API reference
<w:tblPr> element, child of <w:tbl>, holds child elements that define
table properties such as style and borders.
Attributes
alignment
attributealignmentWD_TABLE_ALIGNMENT | NoneHorizontal alignment of table, None if ./w:jc is not present.
autofit
attributeautofitboolFalse when there is a w:tblLayout child with @w:type="fixed".
Otherwise True.
bidiVisual
attributebidiVisualCT_OnOff | None= ZeroOrOne('w:bidiVisual', successors=(_tag_seq[4:]))get_or_add_bidiVisual
attributeget_or_add_bidiVisualCallable[[], CT_OnOff]get_or_add_jc
attributeget_or_add_jcCallable[[], CT_Jc]get_or_add_tblLayout
attributeget_or_add_tblLayoutCallable[[], CT_TblLayoutType]jc
attributejcCT_Jc | None= ZeroOrOne('w:jc', successors=(_tag_seq[8:]))style
attributestyleReturn the value of the val attribute of the <w:tblStyle> child or
None if not present.
tblLayout
attributetblLayoutCT_TblLayoutType | None= ZeroOrOne('w:tblLayout', successors=(_tag_seq[13:]))tblStyle
attributetblStyleCT_String | None= ZeroOrOne('w:tblStyle', successors=(_tag_seq[1:]))xml
attributexmlstrXML string for this element, suitable for testing purposes.
Pretty printed for readability and without an XML declaration at the top.
Functions
first_child_found_in
funcfirst_child_found_in(*tagnames: str) -> _Element | NoneFirst child with tag in tagnames, or None if not found.
paramtagnamesstr= ()Returns
lxml.etree._Element | Noneinsert_element_before
funcinsert_element_before(elm: ElementBase, *tagnames: str)paramelmElementBaseparamtagnamesstr= ()remove_all
funcremove_all(*tagnames: str) -> NoneRemove child elements with tagname (e.g. "a:p") in tagnames.
paramtagnamesstr= ()Returns
Nonexpath
funcxpath(xpath_str: str) -> AnyOverride of lxml _Element.xpath() method.
Provides standard Open XML namespace mapping (nsmap) in centralized location.
paramxpath_strstrReturns
typing.Any