# XLSX

Read, create, or edit Excel spreadsheets (.xlsx/.xlsm), sheet data, formulas, styles...

- Repository: https://github.com/HKUDS/DeepTutor (53613 stars)
- Category: Documents
- License: Apache-2.0
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

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

## Description

Read, create, or edit Excel spreadsheets (.xlsx/.xlsm), sheet data, formulas, styles, charts, multi-sheet workbooks, and bulk .csv/.tsv tables; use whenever a spreadsheet is the input or the deliverable (extract/analyze data, add columns/formulas/formatting/charts, clean messy tables, build from scratch), but not for Google Sheets API or Word/PDF/script outputs.

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

# Excel (.xlsx) workbooks

## Runtime

Use `exec` with complete Python source (`language: python`). Prefer creating,
saving, reopening, and validating the workbook in one call; later calls can
revise the same relative filename. Follow the turn's **User workspace**
instructions for locating inputs, output boundaries, and presenting the
finished file.

Use **openpyxl** for cells, formulas, styles, charts, merged cells, multi-sheet
workbooks, number formats, and streaming large sheets. It is declared by every
supported DeepTutor installation. Do not assume pandas is installed: it exists
in the Docker runner but is not a direct dependency of every pip/source install.

## THE critical gotcha: openpyxl writes formulas but never computes them

`ws["B10"] = "=SUM(B2:B9)"` stores the formula *string*. openpyxl has no formula
engine, the cached value stays empty (or stale, on an edited file). So:

- A workbook you create/edit with openpyxl opens fine in Excel/LibreOffice (they
  recompute on open), but its cached values are wrong until then.
- Anything reading cached values first, `data_only=True`, another
  pandas/openpyxl pass, or a downstream tool, sees blanks/stale data.

Pick by what the deliverable needs:

The rest: https://github.com/HKUDS/DeepTutor/blob/HEAD/deeptutor/skills/builtin/xlsx/SKILL.md
