Skip to content

agent guide

zmworm edited this page Mar 23, 2026 · 53 revisions

Agent Navigation Guide

Quick reference for AI agents to find the right OfficeCLI wiki page.

Decision Tree

What do you want to do? Go to
I know the format and element {format}-{element}-{operation}.md
I know the command but not the format details command-{cmd}-{format}.md
I want to see what's possible for a format {format}-reference.md
I need to understand command syntax command-{cmd}.md
I need to view/inspect a document first command-view-{format}.md or command-get-{format}.md
I got an error troubleshooting.md
I want a complete workflow example workflows.md

File Naming Convention

Pattern Description Example
{format}-reference.md Format index (Layer 1) word-reference.md
{format}-{element}.md Element index (Layer 2) - includes get/remove/query inline + links to add/set word-table.md
{format}-{element}-{operation}.md Operation details (Layer 3) - properties table + examples word-table-add.md
command-{cmd}.md Command syntax overview command-add.md
command-{cmd}-{format}.md Format-specific command reference command-add-word.md

Values:

  • format = word, excel, ppt
  • operation = add, set, get

Recommended Workflow

  1. Inspect - command-view-{format} to view the document
  2. Understand - command-get-{format} to query document structure
  3. Find - Locate the operation page for the task you need
  4. Execute - Run the commands
  5. Verify - command-validate to check the result

Quick Lookup Table

view - Inspect document content

Task Page
View Word text / structure / issues command-view-word
View Excel data / formulas / stats command-view-excel
View PPT slides / shapes / issues command-view-ppt

get - Read element details

Task Page
Get Word paragraph / table / style command-get-word
Get Excel cell / sheet / range command-get-excel
Get PPT slide / shape / placeholder command-get-ppt

query - Find elements by selector

Task Page
Find Word paragraphs by style / runs by font / images without alt command-query-word
Find Excel cells by value / formula / type command-query-excel
Find PPT shapes by text / font / pictures without alt command-query-ppt

add - Create new elements

Task Page
Add text to Word word-paragraph-add
Add table to Word word-table-add
Add image to Word word-picture-add
Add equation to Word word-equation-add
Add chart to Word word-chart-add
Add watermark to Word word-watermark-add
Add header/footer to Word word-header-footer-add
Add bookmark to Word word-bookmark-add
Add field (page number, date) to Word word-field-add
Add page/column break to Word word-break-add
Add content control (SDT) to Word word-sdt-add
Add Excel sheet excel-sheet-add
Add Excel cell with data excel-cell-add
Add Excel chart excel-chart-add
Add Excel table excel-table-add
Add Excel validation excel-validation-add
Add Excel named range excel-namedrange-add
Add Excel pivot table excel-pivottable-add
Add Excel shape / textbox excel-shape-add
Add PPT slide ppt-slide-add
Add PPT shape / textbox ppt-shape-add
Add PPT chart ppt-chart-add
Add PPT image ppt-picture-add
Add PPT table ppt-table-add
Add PPT video / audio ppt-video-add
Add PPT zoom (slide zoom) ppt-zoom-add

set - Modify element properties

Task Page
Format Word paragraph (style, bold, alignment) word-paragraph-set
Format Word run (font, color, underline) word-run-set
Format Word table / row / cell word-table-set
Set Word document metadata word-document-set
Set Word watermark text/color word-watermark-set
Format Excel cell (value, font, fill, border) excel-cell-set
Merge Excel cells excel-cell-set
Set Excel formula excel-cell-set
Freeze Excel panes excel-sheet
Set PPT slide background / transition ppt-slide-set
Format PPT shape (text, fill, animation) ppt-shape-set
Set PPT slide size ppt-presentation-set
Set PPT picture crop / alt text ppt-picture-set
Set PPT theme colors / fonts ppt-theme
Align / distribute PPT shapes ppt-slide-set
Set PPT connector line style ppt-connector
Set PPT group position / size ppt-group
Check morph compatibility ppt-morph-check

remove / move / raw

Task Page
Remove any element command-remove
Move / reorder elements command-move
Swap two elements command-swap
Raw XML for Word command-raw-word
Raw XML for Excel command-raw-excel
Raw XML for PPT command-raw-ppt
Batch multiple commands command-batch
Validate document command-validate

Based on OfficeCLI v1.0.18

Clone this wiki locally