-
Notifications
You must be signed in to change notification settings - Fork 559
excel picture add
zmworm edited this page Apr 9, 2026
·
52 revisions
Add an embedded image to a worksheet.
Path: /{SheetName}
| Property | Default | Description |
|---|---|---|
path / src
|
(required) | Image source: local file path, data:image/png;base64,... data URI, or https://... HTTP URL |
x |
0 |
Horizontal position (EMU or column index) |
y |
0 |
Vertical position (EMU or row index) |
width |
5 |
Image width (EMU or pixels) |
height |
5 |
Image height (EMU or pixels) |
alt |
Alt text description |
officecli add data.xlsx /Sheet1 --type picture --prop path=logo.png --prop x=1 --prop y=1
officecli add data.xlsx /Sheet1 --type picture --prop path=chart.png --prop x=5 --prop y=10 --prop width=400 --prop height=300
officecli add data.xlsx /Sheet1 --type picture --prop path=photo.jpg --prop x=0 --prop y=0 --prop alt="Company Logo"
# Add picture from base64 data URI
officecli add data.xlsx /Sheet1 --type picture --prop "path=data:image/png;base64,iVBORw0KGgo..." --prop x=1 --prop y=1
# Add picture from HTTP URL
officecli add data.xlsx /Sheet1 --type picture --prop path=https://example.com/chart.png --prop x=1 --prop y=5 --prop width=400 --prop height=300Note: Supported image formats: png, jpg, gif, bmp, tiff, emf, wmf, svg. HTTP URLs have a 30s timeout.
Based on OfficeCLI v1.0.40