Table
A DrawingML table object. Not intended to be constructed directly, useSlide.shapes.add_table() to add a table to a slide.
Properties
Collection providing access to rows in this table. Rows are accessed using list notation.
Collection providing access to columns in this table. Columns are accessed using list notation.
When
True, indicates first row should have distinct formatting. Used when the first row contains column headings.When
True, indicates first column should have distinct formatting. Used when the first column contains row headings.When
True, indicates the bottom row should have distinct formatting. Used when a totals row appears as the bottom row.When
True, indicates the rightmost column should have distinct formatting. Used when a row totals column appears at the far right.When
True, indicates rows should have alternating shading. Used to allow rows to be traversed more easily.When
True, indicates columns should have alternating shading.Methods
Generate _Cell object for each cell in this table. Each grid cell is generated in left-to-right, top-to-bottom order.
Cell
Table cell object representing a single cell at a particular row/column location.Properties
Textual content of cell as a single string. Newline characters (
"\n") separate paragraphs, vertical-tab ("\v") characters represent line breaks.TextFrame containing the text that appears in the cell.
FillFormat instance for this cell. Provides access to fill properties such as foreground color.
Vertical alignment of this cell.
None indicates the cell has no explicitly applied setting and its value is inherited.Left margin of cell. Assigning
None uses the default value (0.1 inches for left and right margins).Right margin of cell.
Top margin of cell. Default is 0.05 inches for top and bottom margins.
Bottom margin of cell.
True if this cell is the top-left grid cell in a merged cell.True if this cell is spanned by a merge-origin cell. Note this is False for a merge-origin cell itself.Count of columns spanned by this cell. Only meaningful on merge-origin cells.
Count of rows spanned by this cell. Only meaningful on merge-origin cells.
Methods
Create merged cell from this cell to Raises
other_cell. Either diagonal may be specified in either order.The opposite corner cell of the merge range
ValueError if the range contains merged cells or if other_cell is not in the same table.Remove merge from this merge-origin cell. The merged cell will be “unmerged”, yielding separate cells.Raises
ValueError when this cell is not a merge-origin cell.Row
Table row object.Properties
Height of row in EMU.
Read-only reference to collection of cells in row. Individual cells are accessed using list notation.
Column
Table column object.Properties
Width of column in EMU.