-
Notifications
You must be signed in to change notification settings - Fork 102
excel shape
zmworm edited this page Mar 31, 2026
·
20 revisions
Shape and textbox elements in a worksheet.
Path: /{SheetName}/shape[N]
| Operation | Description |
|---|---|
| add | Insert a shape or textbox |
| get | Get shape properties |
| set | Modify shape properties |
| query | Query shapes by type in selectors |
| remove | Remove a shape |
Returns: name, text, x, y, width, height, size (pt), bold, italic, color, font, fill, shadow, glow
officecli get data.xlsx /Sheet1/shape[1]| Property | Description |
|---|---|
x |
Column offset |
y |
Row offset |
width |
Column span |
height |
Row span |
name |
Shape name |
text |
Text content (supports \n for line breaks) |
font |
Font typeface |
size |
Font size in pt |
bold |
Bold text |
italic |
Italic text |
color |
Font color (hex) |
fill |
Fill color (hex) or "none" for transparent |
align |
Text alignment: left, center/c/ctr, right/r
|
shadow |
Shadow effect |
glow |
Glow effect |
reflection |
Reflection effect |
softedge |
Soft edge radius in pt |
Note: When
fill=none, effects (shadow, glow, reflection, softedge) apply to text runs instead of the shape.
officecli set data.xlsx /Sheet1/shape[1] --prop text="Updated text" --prop fill=4472C4
officecli set data.xlsx /Sheet1/shape[1] --prop shadow=true --prop glow="FF0000-10"officecli get data.xlsx /Sheet1/shape --query "type=shape"
officecli get data.xlsx /Sheet1/shape --query "type=textbox"officecli remove data.xlsx /Sheet1/shape[1]Based on OfficeCLI v1.0.28