-
Notifications
You must be signed in to change notification settings - Fork 528
ppt table set
zmworm edited this page May 24, 2026
·
53 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–medium4, light1–light3, dark1–dark2, 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,charspacingon the table path cascades to all cells. Table-levelborder.left/right/top/bottomfans out to per-celllnL/lnR/lnT/lnBfor parity with docx.
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 / 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
| 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.97