-
Notifications
You must be signed in to change notification settings - Fork 550
excel picture add
zmworm edited this page Apr 17, 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 | |
fallback |
×ばつ1 transparent PNG | Raster fallback image for SVG (used by older Office versions) |
officecli add data.xlsx /Sheet1 --type picture --prop src=logo.png --prop x=1 --prop y=1 officecli add data.xlsx /Sheet1 --type picture --prop src=chart.png --prop x=5 --prop y=10 --prop width=400 --prop height=300 officecli add data.xlsx /Sheet1 --type picture --prop src=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 src=https://example.com/chart.png --prop x=1 --prop y=5 --prop width=400 --prop height=300
officecli add data.xlsx /Sheet1 --type picture --prop src=diagram.svg --prop x=1 --prop y=1
officecli add data.xlsx /Sheet1 --type picture --prop src=icon.svg --prop fallback=icon.png --prop x=1 --prop y=1
×ばつ1 transparent pixel unless `fallback` is specified). --- *Based on OfficeCLI v1.0.50*">
> **Note:** Supported image formats: png, jpg, gif, bmp, tiff, emf, wmf, svg. HTTP URLs have a 30s timeout. SVG images use OOXML dual representation: modern Office (2016+) renders the SVG; older versions fall back to a PNG (auto-generated ×ばつ1 transparent pixel unless `fallback` is specified).
---
*Based on OfficeCLI v1.0.50*