xlsx

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

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/xiaoshan1234/ai-skill --skill xlsx-xiaoshan1234
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/xiaoshan1234/ai-skill/tree/main/role/doc-assistant/skills/xlsx
Command: npx skills add https://github.com/xiaoshan1234/ai-skill --skill xlsx-xiaoshan1234

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 row inserts break references, and charts get dropped on save. This Skill provides tested CLI scripts that handle workbook creation, reading, editing, reference-aware restructuring, 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. - Inspection and editing: Dump sheets as JSON or CSV, list formulas with cached values, set cells, append rows, manage tables and defined names, and recalculate formulas headlessly via LibreOffice. - Reference-aware restructuring: Insert or delete rows and columns while automatically rewriting formula references, merges, tables, and defined names across all sheets. - Use Case: Generate a styled quarterly sales report with formulas and a bar chart from a JSON spec, then recalculate it headlessly and export a sheet to CSV for distribution. ## Quick Start Use the xlsx skill to create a workbook from my JSON spec and then show me the sheet inventory of the resulting file.

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 Python openpyxl?▼

Write a JSON spec defining sheets, rows, styles, charts, and tables, then run xlsx_create.py with the spec and output path. 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 with the input CSV and output xlsx path. It infers int, float, bool, and ISO date types per cell, styles the header row, freezes the top row, and adds an autofilter; use --no-infer to keep everything as strings.

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 values with --data-only.

Does inserting rows in openpyxl update formula references?▼

No, plain openpyxl insert_rows and delete_rows 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, the scripts only support the .xlsx format. Convert legacy .xls files first with LibreOffice using soffice --headless --convert-to xlsx, then process the converted file normally.

Is xlsx sheet protection secure for confidential data?▼

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