-
Notifications
You must be signed in to change notification settings - Fork 517
excel shape add
zmworm edited this page Apr 29, 2026
·
48 revisions
Insert a shape or textbox into a worksheet.
Type: shape, textbox
Parent: /{SheetName}
| Property | Required | Default | Description |
|---|---|---|---|
text |
No | - | Text content (supports \n for line breaks) |
name |
No | auto | Shape name |
font |
No | - | Font typeface |
size |
No | - | Font size in pt |
bold |
No | false | Bold text |
italic |
No | false | Italic text |
color |
No | - | Font color (hex) |
fill |
No | - | Fill color (hex) or "none" for transparent |
line |
No | - | Line/border color (hex) or "none"
|
align |
No | left | Text alignment: left, center/c/ctr, right/r
|
shadow |
No | - | Shadow effect |
glow |
No | - | Glow effect |
reflection |
No | - | Reflection: tight/small, half/true, full, or percentage |
softedge |
No | - | Soft edge radius in pt |
margin |
No | - | Text margin in pt |
x |
No | 1 | Column offset |
y |
No | 1 | Row offset |
width |
No | 5 | Column span |
height |
No | 3 | Row span |
preset / geometry
|
No | rect |
Shape preset geometry (e.g. rect, roundRect, ellipse, triangle, rightArrow, star5, cloud, heart, donut, ...). All OOXML ST_ShapeType preset values accepted via reflection. Sets prstGeom@prst. |
rotation |
No | 0 | Rotation in degrees (±angles with wraparound; stored as 60000ths of a degree) |
flip / flipH / flipV / flipBoth
|
No | - | Flip: `flip=h |
anchor / ref
|
No | - | Cell-range anchor: A1:E10 (spans range), or single-cell A1. Alternative to x/y/width/height. |
Note: When
fill=none, effects (shadow, glow, reflection, softedge) apply to text runs instead of the shape.
officecli add data.xlsx /Sheet1 --type shape --prop text="Hello World" --prop fill=4472C4 --prop color=FFFFFF
officecli add data.xlsx /Sheet1 --type textbox --prop text="Transparent note" --prop fill=none --prop shadow=true- Excel Shape - Shape element reference
- add - Excel - All addable element types
Based on OfficeCLI v1.0.64