xlsx

Installation
SKILL.md

Excel workbooks

You already know openpyxl and pandas. This skill adds what you can't see from the code: a recalculation step that reports what is actually wrong in the workbook, and the behaviours of openpyxl and LibreOffice that silently break files.

Running scripts

<skill> is the directory containing this file. Run bundled scripts by absolute path from the user's working directory, so relative paths to their files keep working:

uv run <skill>/scripts/recalc.py model.xlsx

Run Python you write with its dependencies declared, either uv run --with openpyxl script.py or a PEP 723 header. Recalculation needs LibreOffice (soffice).

Choosing a tool

  • openpyxl for any workbook you deliver: formulas, formatting, charts, validation, comments. It keeps charts, images, comments, data validation and conditional formatting of files it loads. It drops what it does not model, such as shapes, text boxes, slicers and form controls, so check before editing a workbook that has them.
  • pandas for analysis and bulk reads. Its writer keeps only values, so never use it to edit a workbook someone will keep working in.
  • For .xlsm, load with load_workbook(path, keep_vba=True), or the macros are lost on save.
Installs
1.3K
GitHub Stars
174
First Seen
Feb 7, 2026