MCPcopy Index your code
hub / github.com/python-openxml/python-docx / new_tbl

Method new_tbl

src/docx/oxml/table.py:192–197  ·  view source on GitHub ↗

Return a new `w:tbl` element having `rows` rows and `cols` columns. `width` is distributed evenly between the columns.

(cls, rows: int, cols: int, width: Length)

Source from the content-addressed store, hash-verified

190
191 @classmethod
192 def new_tbl(cls, rows: int, cols: int, width: Length) -> CT_Tbl:
193 """Return a new `w:tbl` element having `rows` rows and `cols` columns.
194
195 `width` is distributed evenly between the columns.
196 """
197 return cast(CT_Tbl, parse_xml(cls._tbl_xml(rows, cols, width)))
198
199 @property
200 def tblStyle_val(self) -> str | None:

Callers 1

add_tableMethod · 0.80

Calls 2

parse_xmlFunction · 0.90
_tbl_xmlMethod · 0.80

Tested by

no test coverage detected