CT_Row
paper-docx 0.2.0 API reference
<w:tr> element.
Attributes
add_tc
attributeadd_tcCallable[[], CT_Tc]get_or_add_trPr
attributeget_or_add_trPrCallable[[], CT_TrPr]grid_after
attributegrid_afterintThe number of unpopulated layout-grid cells at the end of this row.
grid_before
attributegrid_beforeintThe number of unpopulated layout-grid cells at the start of this row.
tblPrEx
attributetblPrExCT_TblPrEx | None= ZeroOrOne('w:tblPrEx')tc
attributetc= ZeroOrMore('w:tc')tc_lst
attributetc_lstlist[CT_Tc]trHeight_hRule
attributetrHeight_hRuleWD_ROW_HEIGHT_RULE | NoneThe value of ./w:trPr/w:trHeight/@w:hRule, or None if not present.
trHeight_val
attributetrHeight_valReturn the value of w:trPr/w:trHeight@w:val, or None if not present.
trPr
attributetrPrCT_TrPr | None= ZeroOrOne('w:trPr')tr_idx
attributetr_idxintIndex of this w:tr element within its parent w:tbl element.
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
Nonetc_at_grid_offset
functc_at_grid_offset(grid_offset: int) -> CT_TcThe tc element in this tr at exact grid offset.
Raises ValueError when this w:tr contains no w:tc with exact starting grid_offset.
paramgrid_offsetintReturns
docx.oxml.table.CT_Tcxpath
funcxpath(xpath_str: str) -> AnyOverride of lxml _Element.xpath() method.
Provides standard Open XML namespace mapping (nsmap) in centralized location.
paramxpath_strstrReturns
typing.Any