Skip to content

excel reference

zmworm edited this page Mar 21, 2026 · 54 revisions

Excel (.xlsx) Reference

Complete reference for OfficeCLI operations on Excel documents.

Elements

Element Path Operations
Sheet /{SheetName} add
Cell /{SheetName}/A1 add, set
Validation /{SheetName}/validation[N] add, set
Table /{SheetName}/table[N] add, set
Comment /{SheetName}/comment[N] add
Named Range /namedrange[Name] add, set
Picture /{SheetName}/picture[N] add, set
Shape / Textbox /{SheetName}/shape[N] add
Chart /{SheetName}/chart[N] add, set
Conditional Formatting /{SheetName}/cf[N] add
AutoFilter /{SheetName}/autofilter add
Pivot Table /{SheetName}/pivottable[N] add, set

Workbook Root

Path: /

officecli get data.xlsx /
officecli get data.xlsx / --depth 2

View Modes

Mode Description
text Plain text dump of cell values
annotated Cell values with formatting metadata
outline Structural overview (sheets, tables, charts)
stats Summary statistics (row/column counts, data types)
issues Potential problems (empty sheets, broken formulas, missing refs)
officecli view data.xlsx --mode text
officecli view data.xlsx --mode stats
officecli view data.xlsx --mode issues

Raw XML Parts

Part Path Description
/ or /workbook Workbook XML
/styles Stylesheet XML
/sharedstrings Shared string table
/{SheetName} Worksheet XML
/{SheetName}/drawing Drawing container
/{SheetName}/chart[N] Chart XML

XPath prefixes: x (SpreadsheetML), r (Relationships), a (DrawingML), c (Charts)

officecli raw data.xlsx /Sheet1 --start 1 --end 50 --cols A,B,C
officecli raw data.xlsx /styles

Based on OfficeCLI v1.0.11

Clone this wiki locally