Skip to content

ppt table set

goworm edited this page Jun 26, 2026 · 55 revisions

PowerPoint: Table - Set

Modify table, row, and cell properties including style, dimensions, text, and formatting.

Path: /slide[N]/table[M]

Table Properties

Property Accepted Values Description
tableStyle / style preset or GUID Table style
x, y EMU or units Position
width, height EMU or units Size
name text Table name
zorder / z-order / order front / back / forward / backward / +1 / -1 / absolute index Re-stack the table within the slide shape tree (same vocabulary as shape/picture/chart).
rowHeight EMU or unit-qualified Uniform row height for every row (parity with per-row tr[R] --prop height).
colWidths comma/semicolon-separated lengths Per-column widths (EMU/cm/in/pt). Length must match cols; extra/missing entries fall back to the uniform default.
border.horizontal / border.insideH WIDTH DASH COLOR or STYLE;SIZE;COLOR Inside-horizontal dividers (between rows). Fans out to bottom of rows 1..N-1 plus top of rows 2..N.
border.vertical / border.insideV WIDTH DASH COLOR or STYLE;SIZE;COLOR Inside-vertical dividers (between columns). Fans out to right of cols 1..M-1 plus left of cols 2..M.
firstRow bool tblPr @firstRow flag — header-row styling enabled.
lastRow bool tblPr @lastRow flag — total-row styling enabled.
firstCol bool tblPr @firstCol flag — first-column styling enabled.
lastCol bool tblPr @lastCol flag — last-column styling enabled.
bandedRows bool tblPr @bandRow flag — alternating row banding from the table style.
bandedCols bool tblPr @bandCol flag — alternating column banding from the table style.

Style presets: medium1medium4, light1light3, dark1dark2, none. v1.0.97 also ships a built-in PowerPoint table-style catalogue — pass any of PowerPoint's named styles (Themed Style 1 - Accent 1, Medium Style 2 - Accent 3, …) or a {8EC20E35-…} GUID.

Note: Setting properties like border*, text, bold, italic, size, font, color, underline, strike, valign, fill, baseline, charspacing on the table path cascades to all cells. Table-level border.left/right/top/bottom fans out to per-cell lnL/lnR/lnT/lnB for parity with docx.

officecli set slides.pptx /slide[1]/table[1] --prop style=medium2 --prop width=22cm

Row Properties

Path: /slide[N]/table[M]/tr[R]

Property Accepted Values Description
height EMU or units Row height
c1, c2, c3, ... text Set text of cell by 1-based index
officecli set slides.pptx /slide[1]/table[1]/tr[1] --prop height=1cm

# Set cell text using c1/c2/c3 shorthand
officecli set slides.pptx /slide[1]/table[1]/tr[1] --prop c1="Name" --prop c2="Value" --prop c3="Description"

Cell Properties

Path: /slide[N]/table[M]/tr[R]/tc[C]

Property Accepted Values Description
text text Cell text
font font name Font family
size number (pt) Font size
bold bool Bold
italic bool Italic
color hex RGB Font color
fill / background hex RGB or gradient Cell background (solid: FF0000, gradient: C1-C2 or C1-C2-angle). background is an alias for parity with docx.
image file path Image fill for cell
align left, center, right Alignment
gridSpan integer Columns spanned
rowSpan integer Rows spanned
valign top, center, bottom Vertical alignment
underline underline style Text underline
strikethrough / strike bool Strikethrough text
border hex RGB Border color (all sides)
border.left color and width Left border
border.right color and width Right border
border.top color and width Top border
border.bottom color and width Bottom border
border.tl2br color and width Diagonal border (top-left to bottom-right)
border.tr2bl color and width Diagonal border (top-right to bottom-left)
hmerge bool Horizontal merge continuation
vmerge bool Vertical merge continuation
merge.right integer Merge this cell with N cells to the right (sets gridSpan + hMerge on neighbors)
merge.down integer Merge this cell with N cells below (sets rowSpan + vMerge on neighbors)
# Style header cell
officecli set slides.pptx /slide[1]/table[1]/tr[1]/tc[1] --prop text="Header" --prop bold=true --prop fill=4472C4 --prop color=FFFFFF --prop align=center

# Merge cells horizontally (the easy way)
officecli set slides.pptx /slide[1]/table[1]/tr[1]/tc[1] --prop merge.right=2

# Merge cells vertically
officecli set slides.pptx /slide[1]/table[1]/tr[1]/tc[1] --prop merge.down=3

# Manual merge (low-level)
officecli set slides.pptx /slide[1]/table[1]/tr[1]/tc[1] --prop gridSpan=3

Row & column operations

Verb Path Notes
add /slide[N]/table[M]/col Insert a column. --from /slide[N]/table[M]/col[C] clones from another column.
add /slide[N]/table[M]/tr Insert a row (same --from clone semantics).
move /slide[N]/table[M]/col[C] / tr[R] Same-table row/col reorder.
swap /slide[N]/table[M]/col[A]col[B] Swap two columns or rows.
get /slide[N]/table[M]/col[C] New: per-column read (width, default cell properties).
Cell --from add /slide[N]/table[M]/tr[R]/tc[C] --from <other-cell-path> Copy a cell's value + formatting from another table cell.

Based on OfficeCLI v1.0.116

Clone this wiki locally