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

Method add_column

src/docx/table.py:37–45  ·  view source on GitHub ↗

Return a |_Column| object of `width`, newly added rightmost to the table.

(self, width: Length)

Source from the content-addressed store, hash-verified

35 self._tbl = tbl
36
37 def add_column(self, width: Length):
38 """Return a |_Column| object of `width`, newly added rightmost to the table."""
39 tblGrid = self._tbl.tblGrid
40 gridCol = tblGrid.add_gridCol()
41 gridCol.w = width
42 for tr in self._tbl.tr_lst:
43 tc = tr.add_tc()
44 tc.width = width
45 return _Column(gridCol, self)
46
47 def add_row(self):
48 """Return a |_Row| instance, newly added bottom-most to the table."""

Callers 2

it_can_add_a_columnMethod · 0.95

Calls 1

_ColumnClass · 0.85

Tested by 1

it_can_add_a_columnMethod · 0.76