Paper Office
paper-docxAPI referenceoxml.table

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_afterint

The number of unpopulated layout-grid cells at the end of this row.

grid_before

attributegrid_beforeint

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

The value of ./w:trPr/w:trHeight/@w:hRule, or None if not present.

trHeight_val

attributetrHeight_val

Return the value of w:trPr/w:trHeight@w:val, or None if not present.

trPr

attributetrPrCT_TrPr | None
= ZeroOrOne('w:trPr')

tr_idx

attributetr_idxint

Index of this w:tr element within its parent w:tbl element.

xml

attributexmlstr

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

First child with tag in tagnames, or None if not found.

paramtagnamesstr
= ()

Returns

lxml.etree._Element | None

insert_element_before

funcinsert_element_before(elm: ElementBase, *tagnames: str)
paramelmElementBase
paramtagnamesstr
= ()

remove_all

funcremove_all(*tagnames: str) -> None

Remove child elements with tagname (e.g. "a:p") in tagnames.

paramtagnamesstr
= ()

Returns

None

tc_at_grid_offset

functc_at_grid_offset(grid_offset: int) -> CT_Tc

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

Returns

docx.oxml.table.CT_Tc

xpath

funcxpath(xpath_str: str) -> Any

Override of lxml _Element.xpath() method.

Provides standard Open XML namespace mapping (nsmap) in centralized location.

paramxpath_strstr

Returns

typing.Any

On this page