예제 #1
0
 def add_tbl(self):
     """
     Return a new <w:tbl> element that has been added at the end of any
     existing body content.
     """
     tbl = CT_Tbl.new()
     return self._append_blocklevelelt(tbl)
예제 #2
0
 def add_table(self, rows, cols, width, firstCol=1, firstRow=1, lastCol=0, lastRow=0, hBand=1, vBand=0):
     """
     Return a table of *width* having *rows* rows and *cols* columns,
     newly appended to the content in this container. *width* is evenly
     distributed between the table columns.
     """
     from .table import Table
     tbl = CT_Tbl.new_tbl(rows, cols, width, firstCol, firstRow, lastCol, lastRow, hBand, vBand)
     self._element._insert_tbl(tbl)
     return Table(tbl, self)
예제 #3
0
 def add_table(self, rows, cols, width=Inches(6)):
     """
     Return a table of *width* having *rows* rows and *cols* columns,
     newly appended to the content in this container. *width* is evenly
     distributed between the table columns.
     """
     from .table import Table
     tbl = CT_Tbl.new_tbl(rows, cols, width)
     self._element._insert_tbl(tbl)
     return Table(tbl, self)
예제 #4
0
 def add_table(self, rows, cols, width):
     """
     Return a table of *width* having *rows* rows and *cols* columns,
     newly appended to the content in this container. *width* is evenly
     distributed between the table columns.
     """
     from .table import Table
     tbl = CT_Tbl.new_tbl(rows, cols, width)
     self._element._insert_tbl(tbl)
     return Table(tbl, self)