xlsx

Create, read, edit, and recalculate Excel .xlsx workbooks and CSVs with openpyxl.

Updated Aug 21, 2026
One-click install
npx skills add https://github.com/ewtodd/son-of-anton --skill xlsx-ewtodd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/ewtodd/son-of-anton/tree/main/skills/productivity/xlsx
Command: npx skills add https://github.com/ewtodd/son-of-anton --skill xlsx-ewtodd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openpyxl, and includes scripts (resource) and references (resource) components.

What problem does it solve? Working with Excel files programmatically is error-prone: openpyxl never evaluates formulas, structural edits silently break references, and CSV encoding issues corrupt data. This Skill provides tested command-line scripts that handle workbook creation, inspection, editing, reference-aware restructuring, and CSV conversion with explicit UTF-8 I/O and JSON output. ## Core Features & Use Cases - Workbook Creation from JSON Specs: Build multi-sheet workbooks with styling, formulas, charts, conditional formatting, data validation, native tables, defined names, hyperlinks, and cell notes via xlsx_create.py. - Inspection and Editing: Dump sheets as JSON or CSV, list formulas with cached values, edit cells, append rows, manage tables and defined names with xlsx_read.py and xlsx_edit.py. - Reference-Aware Restructuring: Insert or delete rows and columns while automatically rewriting formula references, merges, tables, and defined names across all sheets using xlsx_restructure.py. - Use Case: Generate a styled quarterly sales report with formulas and charts from a JSON spec, then recalculate it headlessly with LibreOffice so cached values are available for downstream reading. ## Quick Start Ask the agent to create an Excel workbook from a JSON spec using the xlsx skill's scripts, for example to build a styled sales report with formulas and a chart.

Frequently Asked Questions about xlsx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an Excel file with formulas and charts in Python?▼

Write a JSON spec defining sheets, rows, formulas, charts, and styling, then run xlsx_create.py with the spec and output path. Set full_calc_on_load so Excel or LibreOffice recalculates formulas when the file opens, since openpyxl never evaluates them.

How do I recalculate openpyxl formulas without opening Excel?▼

Run xlsx_recalc.py, which shells out to LibreOffice headlessly to open, recalculate, and re-save the workbook so cached values become available. If soffice is not installed, it prints a JSON response with recalculated set to false and installation guidance.

Why do formula references break after inserting rows in openpyxl?▼

Plain openpyxl insert_rows and delete_cols do not shift formula references, merges, or table ranges. Use xlsx_restructure.py instead, which rewrites references across all sheets, though chart anchors, images, and conditional-format rule formulas still cannot be shifted.

Does openpyxl calculate formula results when reading xlsx files?▼

No, openpyxl never computes formulas. Cached results are only available via data_only=True when the file was last saved by Excel or LibreOffice; files written by openpyxl return None until recalculated by a real spreadsheet application.

Can this skill convert legacy .xls files or CSVs to xlsx?▼

Legacy .xls files must first be converted with LibreOffice using soffice --headless --convert-to xlsx. CSV files convert directly via csv_to_xlsx.py with type inference for numbers, booleans, and ISO dates, plus configurable encoding and delimiter.

Is xlsx sheet protection secure for sensitive data?▼

No, sheet protection set via --protect is only an editing signal, not security. Anyone can strip it by editing the zip XML or unchecking it in LibreOffice, so never rely on it for confidentiality or integrity.