Agent skill

Excel Workbook Editor

by HKUDS in HKUDS/DeepTutor

Reads, creates and edits Excel workbooks with openpyxl, including formulas, styles, charts and CSV or TSV tables, with advice on formula values openpyxl cannot compute.

Apache-2.0Auto-check passedDocuments & Office

Install Excel Workbook Editor

skills CLI
$ npx skills add HKUDS/DeepTutor --skill xlsx -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HKUDS/DeepTutor xlsx --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HKUDS/DeepTutor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/deeptutor/skills/builtin/xlsx .claude/skills/xlsx && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
xlsx
GitHub stars
41k
Token cost
~1.9k tokens
SKILL.md length
642 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
Apache-2.0

At a glance

Reads, creates and edits Excel workbooks with openpyxl, including formulas, styles, charts and CSV or TSV tables, with advice on formula values openpyxl cannot compute.

  • Works in 2 steps: Static numbers (most common). If the… → Live model (formulas that recompute on…
  • Adding columns, formulas or charts to an existing .xlsx file
  • SKILL.md covers Runtime, THE critical gotcha: openpyxl…, Reading and Creating, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The agent runs Python through an exec tool and uses openpyxl for cells, formulas, styles, charts, merged cells, number formats and multi-sheet workbooks. It prefers to create, save, reopen and validate a workbook in a single call, and it does not assume pandas is installed, since not every installation includes it.

The central warning is that openpyxl stores a formula as text and never calculates it, so cached values stay empty or stale. For static results the skill says to compute in Python and write the numbers. For live models it writes real formulas that reference cells, then recalculates with LibreOffice (soffice) in a relative _recalc folder when available, and otherwise warns that values will appear once you open the file in Excel.

When your agent uses it

  • Adding columns, formulas or charts to an existing .xlsx file
  • Cleaning a messy table and saving it as a formatted spreadsheet
  • Building a multi-sheet workbook from scratch
  • Reading computed formula results out of a workbook

Example prompts

  • “Add a total column and a bar chart to sales-q3.xlsx.”
  • “Read the computed values from budget.xlsx instead of the formula text.”
  • “Build a three-sheet workbook for a monthly expense tracker with live formulas.”
  • “Convert the tab-separated file survey.tsv into a formatted Excel workbook.”

Requirements

  • Python with openpyxl
  • LibreOffice (soffice) to recalculate live formulas, optional

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Static numbers (most common). If the user just needs correct values and
  2. Live model (formulas that recompute on the user's later edits). Write real

What it can do on your machine

Read from SKILL.md and the folder at commit 6cf793b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Excel Workbook Editor loads about 1.9k tokens when it runs. Until then it costs about 93 tokens; SKILL.md has 642 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~93
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HKUDS/DeepTutor at commit 6cf793b, republished under its Apache-2.0 licence (© HKUDS). 642 words, ~1,947 tokens.

Download SKILL.mdSave it as .claude/skills/xlsx/SKILL.md (or your agent's skills folder).
name
xlsx
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.
tags
tool, office
requires.sandbox
shell

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:

  1. Static numbers (most common). If the user just needs correct values and the sheet need not stay live, compute in Python and write the number, not a formula string: ws["B10"] = sum(c.value for c in ws["B2:B9"][0]). Correct immediately, no recalc needed.
  2. Live model (formulas that recompute on the user's later edits). Write real formulas, and reference cells not literals (=B5*(1+$B$6), not =B5*1.05). openpyxl can't set the cached value too. If shutil.which("soffice") succeeds, recalculate through exec using subprocess.run and a relative _recalc/ directory, replace out.xlsx with the recalculated copy, then remove _recalc/. Never use /tmp or search for a desktop installation. A later exec call can see the same bare filename. If LibreOffice is absent, warn that formulas populate when the user opens the file in Excel.

Reading

python
from openpyxl import load_workbook

wb = load_workbook("in.xlsx", read_only=True, data_only=False)
for sheet_name in wb.sheetnames:
    ws = wb[sheet_name]
    for row in ws.iter_rows(values_only=True):
        print(row)

To read computed results of formulas (not the formula text), use openpyxl with data_only=True — returns the value Excel last cached:

python
from openpyxl import load_workbook

wb = load_workbook("in.xlsx", data_only=True)
val = wb["Sheet1"]["B10"].value  # None if Excel never opened/saved the file

Gotcha: never save() a workbook loaded with data_only=True — that discards every formula permanently (verified: the cell becomes None). Load twice if you need both formulas and values.

Large file: load_workbook(path, read_only=True) streams rows cheaply.

Creating

python
from openpyxl import Workbook, load_workbook
from openpyxl.styles import Font, PatternFill, Alignment

wb = Workbook()
ws = wb.active
ws.title = "Summary"
ws.append(["Region", "Sales"])  # header row
for r in [("West", 120), ("East", 95)]:
    ws.append(r)
ws["B4"] = "=SUM(B2:B3)"  # see formula gotcha above

ws["A1"].font = Font(bold=True)
ws["A1"].fill = PatternFill("solid", fgColor="DDDDDD")
ws["A1"].alignment = Alignment(horizontal="center")
ws["B2"].number_format = "#,##0"  # thousands separator
ws.column_dimensions["A"].width = 18
ws.freeze_panes = "A2"  # freeze header
wb.create_sheet("Detail")  # second sheet
wb.save("out.xlsx")

# Validate immediately; later exec calls can also reopen this relative path.
check = load_workbook("out.xlsx", data_only=False)
assert check.sheetnames, "generated workbook has no worksheets"
import zipfile

with zipfile.ZipFile("out.xlsx") as package:
    assert package.testzip() is None, "generated XLSX has a corrupt ZIP member"

For large exports, use openpyxl's write-only mode and append rows without holding every cell object in memory:

python
from openpyxl import Workbook

wb = Workbook(write_only=True)
ws = wb.create_sheet("Data")
ws.append(["id", "value"])
for row in rows:
    ws.append(row)
wb.save("out.xlsx")
Show full SKILL.md (271 more words)Show less

Editing (preserve existing formatting)

load_workbook keeps styles, formulas, merged cells, charts intact — edit only what you touch. Do NOT round-trip through pandas to preserve formatting (pandas rewrites the whole sheet, losing styles).

python
from openpyxl import load_workbook

wb = load_workbook("in.xlsx")  # keep formulas (data_only=False)
ws = wb["Sheet1"]
ws["C2"] = "Updated"
wb.save("out.xlsx")  # preserve the source; present the new file

Match the file's existing conventions (font, number formats, colors) rather than imposing new ones — an established template wins over any default.

When inserting/deleting rows or columns (ws.insert_rows, ws.delete_cols), openpyxl does not rewrite formulas that reference shifted cells. Re-point affected formulas yourself, or avoid structural shifts in formula-heavy sheets.

Charts

python
from openpyxl.chart import BarChart, Reference

ch = BarChart()
ch.title = "Sales"
data = Reference(ws, min_col=2, min_row=1, max_row=3)  # include header for title
cats = Reference(ws, min_col=1, min_row=2, max_row=3)
ch.add_data(data, titles_from_data=True)
ch.set_categories(cats)
ws.add_chart(ch, "E2")

LineChart / PieChart / ScatterChart follow the same shape.

Verifying you produced clean output

In the same exec Python call, reload and scan for error strings after writing. These mean broken formulas that recalc surfaced (#REF! bad reference, #DIV/0! zero denominator, #VALUE! type mismatch, #NAME? unknown function, #N/A):

python
from openpyxl import load_workbook

wb = load_workbook("out.xlsx", data_only=True)
errs = [
    f"{s}!{c.coordinate}={c.value}"
    for s in wb.sheetnames
    for row in wb[s].iter_rows()
    for c in row
    if isinstance(c.value, str) and c.value.startswith("#")
]
print(errs or "clean")

This only catches errors in cached values. If you wrote formulas and couldn't recalc (no soffice), cached values are blank, so the check is meaningful only after a recalc or after Excel opens the file. Writing computed numbers (option 1) sidesteps this.

CSV / TSV

python
import csv

with open("in.csv", newline="", encoding="utf-8-sig") as source:
    rows = list(csv.reader(source))  # delimiter="\t" for TSV
with open("out.csv", "w", newline="", encoding="utf-8") as target:
    csv.writer(target).writerows(rows)

For messy input (junk rows, header not on row 1, ragged columns), inspect a bounded sample and explicitly normalize only the requested rows/columns.

Raw OOXML (rarely needed)

openpyxl covers essentially all xlsx features; reach for raw XML only for the narrow cases it can't express (e.g. preserving an exotic part it drops on re-save). An .xlsx is a ZIP: xl/workbook.xml, xl/worksheets/sheet1.xml, xl/sharedStrings.xml, plus [Content_Types].xml and _rels/. Unzip with stdlib zipfile, edit the part, re-zip — keep [Content_Types].xml and every .rels consistent, keep IDs unique, and don't pretty-print into value-bearing text nodes. Correctness check = it opens in Excel with no repair prompt.

© HKUDS, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in deeptutor/skills/builtin/xlsx of HKUDS/DeepTutor.

Open the folder on GitHubat commit 6cf793b

Compare with similar skills

Excel Workbook Editor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Excel Workbook Editor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Excel Workbook Editor this skillHKUDS/DeepTutor41k—~1.9kAutomated safety check: PassApache-2.0
BiSheng XLSX Workbook Builderdataelement/bisheng12k—~1.7kAutomated safety check: PassApache-2.0
XLSX Spreadsheet ToolkitXiaomiMiMo/MiMo-Code14k—~2.9kAutomated safety check: PassApache-2.0
Excel Spreadsheet Builderagentscope-ai/QwenPaw36k—~1.8kAutomated safety check: PassProprietary
XLSXnexus-research-lab/nexus151—~501Automated safety check: PassApache-2.0
Spreadsheetdavila7/claude-code-templates32k1 repos~1.3kAutomated safety check: NotesApache-2.0

Similar skills

  • Builds, edits and cleans Excel workbooks inside BiSheng's code executor using openpyxl, with LibreOffice recalculation and a pre-delivery check.

    12k GitHub stars~1.7k tokensUpdated today
    Documents & OfficeAuto-check passed
  • XLSX Spreadsheet Toolkit

    XiaomiMiMo/MiMo-Code

    Builds, edits, cleans, recalculates and reads Excel workbooks and CSV files with openpyxl and pandas, plus LibreOffice for recalculation and PDF export.

    14k GitHub stars~2.9k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Excel Spreadsheet Builder

    agentscope-ai/QwenPaw

    Creates, edits, cleans and analyzes Excel and CSV files with openpyxl and pandas, recalculating formulas through LibreOffice so files are delivered without formula errors.

    36k GitHub stars~1.8k tokensUpdated today
    Documents & OfficeAuto-check passed
  • XLSX

    nexus-research-lab/nexus

    只要电子表格文件(.xlsx、.xlsm、旧版 .xls、.csv、.tsv)是任务的主要输入或输出,或者需要 被打开、读取、创建、修改,就使用本 Skill。也适用于公式、格式、图表、数据清洗和表格格式转换。

    151 GitHub stars~501 tokensUpdated today
    Documents & OfficeAuto-check passed
  • Spreadsheet

    davila7/claude-code-templates

    A skill your agent uses when tasks involve creating, editing, analyzing, or formatting spreadsheets (.xlsx, .csv, .tsv) using Python (openpyxl, pandas), especially when formulas, references, and…

    32k GitHub starsUsed in 1 repo~1.3k tokens
    Documents & OfficeAuto-check: notes
  • Openai Spreadsheet

    trailofbits/skills-curated

    Official

    A skill your agent uses when tasks involve creating, editing, analyzing, or formatting spreadsheets (.xlsx, .csv, .tsv) using Python (openpyxl, pandas), especially when formulas, references, and…

    513 GitHub stars~1.3k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check: notes

More from HKUDS/DeepTutor

  • DeepTutor CLI

    HKUDS/DeepTutor

    Teaches the agent to set up and run DeepTutor from the command line: chat and capabilities, knowledge bases, partners, memory, sessions, notebooks and the server or Web app.

    41k GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed
  • Reads, creates and edits Word .docx files with python-docx, and drops to raw OOXML for tracked changes, comments and byte-exact edits.

    41k GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Reads, extracts from, creates, merges, splits, watermarks, encrypts and fills PDF files with pdfplumber, pypdf and reportlab inside a Python sandbox.

    41k GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed
  • Explains how to design and write DeepTutor skills: the SKILL.md anatomy, a trigger-focused description, concise content and progressive disclosure into reference files.

    41k GitHub stars~840 tokensUpdated yesterday
    Auto-check passed

Questions about Excel Workbook Editor

What does Excel Workbook Editor do?

Reads, creates and edits Excel workbooks with openpyxl, including formulas, styles, charts and CSV or TSV tables, with advice on formula values openpyxl cannot compute. The agent runs Python through an exec tool and uses openpyxl for cells, formulas, styles, charts, merged cells, number formats and multi-sheet workbooks. It prefers to create, save, reopen and validate a workbook in a single call, and it does not assume pandas is installed, since not every installation includes it.

When should I use Excel Workbook Editor?

Excel Workbook Editor fits situations like: adding columns, formulas or charts to an existing .xlsx file; cleaning a messy table and saving it as a formatted spreadsheet; building a multi-sheet workbook from scratch; reading computed formula results out of a workbook.

How do I install Excel Workbook Editor in Claude Code?

Run `npx skills add HKUDS/DeepTutor --skill xlsx -a claude-code`. Or copy the skill folder (deeptutor/skills/builtin/xlsx in HKUDS/DeepTutor) into .claude/skills/xlsx in your project. Claude Code loads it when a task matches its description.

How do I install Excel Workbook Editor in Codex?

Run `npx skills add HKUDS/DeepTutor --skill xlsx -a codex`. Or copy the skill folder (deeptutor/skills/builtin/xlsx in HKUDS/DeepTutor) into .agents/skills/xlsx in your project. Codex loads it when a task matches its description.

Can I use Excel Workbook Editor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/DeepTutor --skill xlsx -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/xlsx, .gemini/skills/xlsx, .github/skills/xlsx and .opencode/skills/xlsx in your project.

What does Excel Workbook Editor need to run?

SKILL.md names no scripts, command-line tools or credentials: Excel Workbook Editor is instructions for the agent only. Our summary lists: Python with openpyxl; LibreOffice (soffice) to recalculate live formulas, optional.

Does Excel Workbook Editor access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Excel Workbook Editor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Excel Workbook Editor use?

Excel Workbook Editor is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Excel Workbook Editor use?

About 1.9k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Excel Workbook Editor?

Skills that share tags, products or a category with Excel Workbook Editor: BiSheng XLSX Workbook Builder (dataelement/bisheng, 12k stars), XLSX Spreadsheet Toolkit (XiaomiMiMo/MiMo-Code, 14k stars), Excel Spreadsheet Builder (agentscope-ai/QwenPaw, 36k stars) and XLSX (nexus-research-lab/nexus, 151 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Excel Workbook Editor?

HKUDS (a GitHub organization) maintains it in HKUDS/DeepTutor, which has 40,975 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 8, 2026.

Source: HKUDS/DeepTutor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.