Skip to content

command add excel

zmworm edited this page Apr 11, 2026 · 53 revisions

add - Excel (.xlsx)

Addable element types in Excel documents.

Element Types

Type Aliases Parent Reference
sheet - / Excel-Sheet-Add
cell - /{SheetName} Excel-Cell-Add
row - /{SheetName} Excel-Cell-Add
validation datavalidation /{SheetName} Excel-Validation-Add
table listobject /{SheetName} Excel-Table-Add
comment note /{SheetName} Excel-Comment-Add
namedrange definedname / Excel-NamedRange-Add
picture image /{SheetName} Excel-Picture-Add
chart - /{SheetName} Excel-Chart-Add
databar conditionalformatting /{SheetName} Excel-ConditionalFormatting-Add
colorscale - /{SheetName} Excel-ConditionalFormatting-Add
iconset - /{SheetName} Excel-ConditionalFormatting-Add
formulacf - /{SheetName} Excel-ConditionalFormatting-Add
autofilter - /{SheetName} Excel-AutoFilter-Add
pivottable pivot /{SheetName} Excel-PivotTable-Add
shape - /{SheetName} Excel-Shape-Add
textbox - /{SheetName} Excel-Shape-Add
sparkline - /{SheetName} Excel-Sparkline-Add
csv tsv /{SheetName} Import CSV/TSV data (see Command Reference)
ole oleobject, embed, embeddedobject /{SheetName} Excel-OLE-Add

OLE / Embedded Object

Embed an Office (or other OLE-compatible) document as an object inside the worksheet. Excel anchors the object to a cell range.

Property Required Description
src yes Path to the file to embed (.docx, .xlsx, .pptx, .pdf, etc.). Alias: path.
progId no OLE ProgID (e.g. Word.Document.12, Excel.Sheet.12, Package). Auto-detected from src extension when omitted.
width no Display width as unit-qualified size (6cm, 2in, 160pt) or raw EMU.
height no Display height as unit-qualified size (4cm, 1.5in, 120pt) or raw EMU.
icon no Path to a custom icon image used when the object is rendered as an icon.
name no Display name shown under the icon.

Note: Excel OLE objects do not accept the display property — use anchor (e.g. anchor=B2:E6) or x/y/width/height for positioning instead.

Examples

# Embed a Word document at cell A1 with default size
officecli add book.xlsx /Sheet1/A1 --type ole --prop src=memo.docx

# Embed a PowerPoint deck at 6cm × 4cm
officecli add book.xlsx /Sheet1/B2 --type ole --prop src=deck.pptx --prop width=6cm --prop height=4cm

# Embed a PDF with a custom display name
officecli add book.xlsx /Sheet1/C3 --type ole --prop src=report.pdf --prop name="Q3 Report"

See Also


Based on OfficeCLI v1.0.43

Clone this wiki locally