# XLSX

Read, inspect, edit, or create Microsoft Excel `.xlsx` workbooks, including structured...

- Repository: https://github.com/TokenRhythm/opensquilla (7104 stars)
- Category: Documents
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add TokenRhythm/opensquilla --skill xlsx -g -a claude-code -y`
Codex: `npx skills add TokenRhythm/opensquilla --skill xlsx -g -a codex -y`
Cursor: `npx skills add TokenRhythm/opensquilla --skill xlsx -g -a cursor -y`
Gemini CLI: `npx skills add TokenRhythm/opensquilla --skill xlsx -g -a gemini-cli -y`

## Description

Read, inspect, edit, or create Microsoft Excel `.xlsx` workbooks, including structured data extraction, formula-aware cell edits, and workbook generation from rows.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# xlsx

Work with `.xlsx` workbooks. The format is OOXML SpreadsheetML, a zip
container of XML parts. Treat each cell as a typed value: a number, a string,
a datetime, or a formula. Mixing the four causes Excel to flag the workbook
or compute incorrect totals.

## Decide the path first

| You have | Goal | Path |
|---|---|---|
| Existing `.xlsx` | Read sheets and cells | A. Inspect |
| Existing `.xlsx` | Modify specific cells | B. Edit-in-place |
| Nothing or a brief | Build a new workbook | C. Create from scratch |

If the user provides a workbook to update, default to path B and treat the
input as the formatting baseline. Choose path C only when the user says
"start fresh".

## Execution and delivery

Use `execute_code` with the Python examples below when it is available. Keep
all input and output files in the active workspace, then call
`publish_artifact(path="out.xlsx")` to deliver the finished workbook.
In a restricted channel, use `openpyxl` directly; the shell commands below
are optional shortcuts for sessions that expose `exec_command`. Do not use
Python subprocesses to bypass an unavailable shell tool or request host
execution when the sandbox fails. If execution or a required library is
unavailable, report that limitation and keep the session read-only.

---

## Path A: Inspect

With `execute_code`:

```python
from openpyxl import load_workbook
wb = load_workbook("book.xlsx", data_only=False)
for ws in wb.worksheets:
    print(ws.title, list(ws.values))
wb.close()
```

```bash
python {baseDir}/scripts/inspect_xlsx.py /path/to/book.xlsx
```

Output:

```json
{
  "sheets": [
    {
      "name": "Q3",
      "max_row": 10,
      "max_col": 5,
      "rows": [
        [
          {"value": "Metric", "type": "s"},
          {"value": "Value", "type": "s"}
        ],
        [
          {"value": "Revenue", "type": "s"},
          {"value": 2100000, "type": "n"}
        ]
      ]
    }
  ]
}
```

The rest: https://github.com/TokenRhythm/opensquilla/blob/HEAD/src/opensquilla/skills/bundled/xlsx/SKILL.md
