Skip to content
Back to skills

Excel Cli

ASecurity

Quick start for changing or checking an Excel workbook with the excelcli command. Use before your first excelcli call. Gives the usual open, change, check and save routine and the exact batch names for common actions, so you can skip most --help and list-actions lookups.

  • 981 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added September 2, 2026
ai-agentsshell

Works with

  • cli

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned November 10, 2026

npx -y skills add sbroenne/mcp-server-excel --skill excel-cli --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Excel Cli?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Excel Cli
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sbroenne-excel-cli/badge)](https://www.skillsdirectory.com/skills/sbroenne-excel-cli)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: excel-cli
description: >
  Quick start for changing or checking an Excel workbook with the excelcli
  command. Use before your first excelcli call. Gives the usual open, change,
  check and save routine and the exact batch names for common actions, so you
  can skip most --help and list-actions lookups.
---

# excelcli quick start

If `excelcli` is not on PATH, run this plugin's `bin\start-cli.ps1` by its full
path with the same arguments.

## The routine: about three calls

1. **Open and look** in one batch. Start the batch with `session.open`; later
   entries in the same batch use that workbook automatically. Read what you
   need to plan, such as `sheet.list`, `table.list` and `range.get-used-range`.
   The result of `session.open` gives the `sessionId`. Before editing, check
   its `autoSaveOn` and `warning`: Excel may save edits automatically.
2. **Change and check** in one batch with `--session <sessionId>
   --stop-on-error`. Put the writes first, then reads of the cells you changed,
   so one result shows that the change worked.
3. **Save and close**: `session close --session <sessionId> --save`, only after
   step 2's reads look right. Closing without `--save` discards only unsaved
   edits; it cannot undo changes already saved by AutoSave.

Pass the batch as a JSON array in a file with `--input <file>`. Direct
`excelcli` calls also accept standard input (`batch` with no `--input`), but
the PowerShell launcher requires `--input <file>`. Each entry is
`{"command":"group.action","args":{...}}`. Argument names are case-sensitive
camelCase. Put arrays and objects in as JSON, not as strings of JSON. Check
every entry's `success` in the output; one failed entry does not undo the
others.

```json
[
  {"command":"session.open","args":{"filePath":"C:\\work\\prices.xlsx"}},
  {"command":"sheet.list"},
  {"command":"table.list"},
  {"command":"range.get-used-range","args":{"sheetName":"Prices"}}
]
```

Keep reads small: ask for the rows and columns you need, not a whole large
sheet. Don't close and reopen the workbook to check your work; read it back in
the same session.

## Exact names for common actions

Only run `<group> <action> --help` for actions that are not listed here.

| Command | args |
|---|---|
| `session.open` | `filePath` |
| `session.close` | `save` (true/false) |
| `sheet.list` | none |
| `sheet.create` | `sheetName` |
| `range.get-used-range` | `sheetName` |
| `range.get-values` | `sheetName`, `rangeAddress` |
| `range.get-formulas` | `sheetName`, `rangeAddress` |
| `range.get-info` | `sheetName`, `rangeAddress` |
| `range.set-values` | `sheetName`, `rangeAddress`, `values` (2D array), `overwritePolicy` |
| `range.set-formulas` | `sheetName`, `rangeAddress`, `formulas` (2D array, each formula starts with `=`), `overwritePolicy` |
| `range.set-number-format` | `sheetName`, `rangeAddress`, `formatCode` |
| `rangeedit.fill` | `sheetName`, `rangeAddress`, `direction`, `overwritePolicy` |
| `rangeedit.sort` | `sheetName`, `rangeAddress`, `sortColumns` (`[{"columnIndex":1,"ascending":true}]`, 1-based within the range), `hasHeaders` |
| `rangeformat.format` | `sheetName`, `rangeAddresses` (array), `formatOptions` (object: `bold`, `fontColor`, `fillColor`, `numberFormat`, `horizontalAlignment`, `wrapText`, `borders`, ...) |
| `rangeformat.auto-fit-columns` | `sheetName`, `rangeAddress` |
| `table.list` | none |
| `table.read` | `tableName` |
| `table.append` | `tableName`, `rows` (2D array) |
| `tablecolumn.add-column` | `tableName`, `columnName`, `position` (1-based, optional) |
| `tablecolumn.set-column-number-format` | `tableName`, `columnName`, `formatCode` |
| `pivottable.list` | none |
| `pivottable.read` | `pivotTableName` |
| `pivottable.create-from-table` | `tableName`, `destinationSheet`, `destinationCell`, `pivotTableName` |
| `pivottablefield.add-row-field` | `pivotTableName`, `fieldName` |
| `pivottablefield.add-value-field` | `pivotTableName`, `fieldName`, `aggregationFunction` (Sum, Count, Average, Max, Min), `customName` |
| `pivottablefield.set-field-format` | `pivotTableName`, `fieldName`, `numberFormat` |
| `slicer.create-table-slicer` | `tableName`, `columnName`, `slicerName`, `destinationSheet`, `position` |
| `slicer.set-table-slicer-selection` | `slicerName`, `selectedItems` (array) |
| `slicer.create-slicer` (PivotTable) | `pivotTableName`, `fieldName`, `slicerName`, `destinationSheet`, `position` |
| `slicer.set-slicer-selection` (PivotTable) | `slicerName`, `selectedItems` (array) |
| `chart.create-from-range` | `sheetName`, `sourceRangeAddress`, `chartType` (e.g. ColumnClustered, Line, Pie, BarClustered), `chartName`, `targetRange` |
| `chartconfig.set-title` | `chartName`, `title` |
| `powerquery.list` | none |
| `powerquery.view` | `queryName` |
| `powerquery.update` | `queryName`, `mCode`, `refresh` |
| `workbook.refresh-all` | `timeoutSeconds` (optional) |
| `window.freeze-panes` | `sheetName`, `frozenRows`, `frozenColumns` |

`range.set-values` and `range.set-formulas` refuse to overwrite cells that
already have content. Set `"overwritePolicy":"allow"` only when you mean to
replace them.

Files in this skill

  • README.md3.6 KB
  • SKILL.md10.1 KB
  • references/README.md875 B
  • references/analysis.md2.4 KB
  • references/anti-patterns.md12.3 KB
  • references/behavioral-rules.md14.6 KB
  • references/chart.md8.1 KB
  • references/cli-commands.md95.5 KB
  • references/conditionalformat.md8.6 KB
  • references/dashboard.md5.4 KB
  • references/datamodel.md11.5 KB
  • references/dmv-reference.md2.9 KB
  • references/drawing.md2.3 KB
  • references/excel_agent_mode.md6 KB
  • references/gotchas.md7.1 KB
  • references/m-code-syntax.md1.3 KB
  • references/pivottable.md7.6 KB
  • references/powerquery.md9.1 KB
  • references/querytable.md2.6 KB
  • references/range.md8.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.