xlsx

Create, read, edit, and convert Excel .xlsx workbooks and CSV files using openpyxl.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill xlsx-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/CHENHUI-X/toolbox/tree/main/official-skills/productivity/xlsx
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill xlsx-chenhui-x

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 calculates formulas, plain insert/delete breaks references, and charts get dropped on re-save. This Skill provides tested CLI scripts that handle workbook creation, reading, editing, reference-aware restructuring, recalculation, and CSV conversion with these pitfalls already addressed. ## Core Features & Use Cases - Workbook creation from JSON specs: Build multi-sheet workbooks with styling, number formats, merged cells, freeze panes, autofilters, conditional formatting, charts, data-validation dropdowns, native Excel tables, defined names, hyperlinks, and cell notes. - Reading and inspection: Dump sheets as JSON or CSV, list formulas alongside cached values, inventory sheets, notes, tables, and defined names. - Safe editing and restructuring: Set cells, append rows, manage tables and names, and perform reference-aware row/column insertions and deletions that rewrite formulas, merges, and ranges across all sheets. - Recalculation and CSV interop: Recalculate formulas headlessly via LibreOffice, and convert between CSV and xlsx with type inference and explicit encodings. - Use Case: Generate a styled quarterly sales report with formulas and a bar chart from a JSON spec, recalculate it with LibreOffice, then export a single sheet to CSV for distribution. ## Quick Start Ask the AI to create an Excel workbook from your data using the xlsx skill, for example: "Create a styled xlsx report with two sheets, formulas summing the totals, and a bar chart, then export the summary sheet to CSV."

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 xlsx file with Python and openpyxl?

Write a JSON spec describing sheets, rows, styles, charts, tables, and formats, then run xlsx_create.py spec.json out.xlsx. The script builds the workbook with openpyxl and prints a JSON summary of the created sheets.

How do I convert CSV to Excel with type inference?

Run csv_to_xlsx.py data.csv out.xlsx to convert a CSV into a styled workbook. It infers int, float, bool, and ISO date types per cell, styles the header row, freezes the top row, and adds an autofilter.

Why do openpyxl formulas show None instead of calculated values?

openpyxl never evaluates formulas; cached results exist only if the file was last saved by Excel or LibreOffice. Run xlsx_recalc.py to recalculate headlessly via LibreOffice, then read with --data-only.

Does openpyxl update formula references when inserting rows?

No, plain openpyxl insert_rows and delete_cols do not shift formula references, merges, or tables. Use xlsx_restructure.py, which rewrites references across all sheets and reports anything it could not shift, such as chart anchors.

Can this skill read legacy .xls files?

No, it only supports the .xlsx format. Convert legacy .xls files first with LibreOffice using soffice --headless --convert-to xlsx old.xls, then process the result normally.

Is xlsx sheet protection secure for confidential data?

No, sheet protection is not security. It only signals well-behaved apps not to edit the sheet and can be stripped by editing the file's XML or unchecking it in LibreOffice; it encrypts nothing.