-
Notifications
You must be signed in to change notification settings - Fork 102
ppt table set
zmworm edited this page Mar 31, 2026
·
23 revisions
Modify table, row, and cell properties including style, dimensions, text, and formatting.
Path: /slide[N]/table[M]
| 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,charspacingon the table path cascades to all cells.
officecli set slides.pptx /slide[1]/table[1] --prop style=medium2 --prop width=22cmPath: /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"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 |
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=3Based on OfficeCLI v1.0.28