Return table of `width` having `rows` rows and `cols` columns. The table is appended appended at the end of the content in this container. `width` is evenly distributed between the table columns.
(self, rows: int, cols: int, width: Length)
| 59 | return paragraph |
| 60 | |
| 61 | def add_table(self, rows: int, cols: int, width: Length) -> Table: |
| 62 | """Return table of `width` having `rows` rows and `cols` columns. |
| 63 | |
| 64 | The table is appended appended at the end of the content in this container. |
| 65 | |
| 66 | `width` is evenly distributed between the table columns. |
| 67 | """ |
| 68 | from docx.table import Table |
| 69 | |
| 70 | tbl = CT_Tbl.new_tbl(rows, cols, width) |
| 71 | self._element._insert_tbl(tbl) # pyright: ignore[reportPrivateUsage] |
| 72 | return Table(tbl, self) |
| 73 | |
| 74 | def iter_inner_content(self) -> Iterator[Paragraph | Table]: |
| 75 | """Generate each `Paragraph` or `Table` in this container in document order.""" |