Skip to content

ppt table set

zmworm edited this page Mar 21, 2026 · 53 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

Style presets: medium1, medium2, medium3, medium4, light1, light2, light3, dark1, dark2, none

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.

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
officecli set slides.pptx /slide[1]/table[1]/tr[1] --prop height=1cm

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 hex RGB or gradient Cell background (solid: FF0000, gradient: C1-C2 or C1-C2-angle)
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
# 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
officecli set slides.pptx /slide[1]/table[1]/tr[1]/tc[1] --prop gridSpan=3

Based on OfficeCLI v1.0.11

Clone this wiki locally