Agent Skills
› NeverSight/learn-skills.dev
› xlsx
xlsx
GitHub专注于使用Node.js和Python自动化Excel工作流,支持创建、读取、修改及格式化处理。适用于报表生成、数据提取、模板填充及CSV转换,涵盖ExcelJS、SheetJS、pandas等工具的最佳实践。
Trigger Scenarios
程序化生成Excel报表
读取和解析XLSX文件
保留格式的修改电子表格
自动化重复性Excel任务
在CSV和XLSX之间转换
Install
npx skills add NeverSight/learn-skills.dev --skill xlsx -g -y
SKILL.md
Frontmatter
{
"name": "xlsx",
"description": "Expert in automating Excel workflows using Node.js (ExcelJS, SheetJS) and Python (pandas, openpyxl)."
}
XLSX Skill
Purpose
Provides expertise in creating, reading, modifying, and automating Excel spreadsheet workflows. Specializes in programmatic spreadsheet manipulation using ExcelJS, SheetJS, pandas, and openpyxl for data processing, reporting, and automation.
When to Use
- Creating Excel reports programmatically
- Reading and parsing XLSX files
- Modifying existing spreadsheets while preserving formatting
- Automating repetitive Excel tasks
- Converting between CSV and XLSX formats
- Building Excel templates with formulas
- Extracting data from complex spreadsheets
- Generating formatted financial or data reports
Quick Start
Invoke this skill when:
- Creating Excel reports programmatically
- Reading and parsing XLSX files
- Modifying existing spreadsheets while preserving formatting
- Automating repetitive Excel tasks
- Converting between CSV and XLSX formats
Do NOT invoke when:
- Creating Google Sheets → different API
- Building Excel add-ins → use appropriate .NET/JS skill
- Data analysis without Excel output → use data-analyst
- CSV-only operations → use csv-data-wrangler
Decision Framework
Excel Task?
├── Node.js Environment → ExcelJS (full-featured) or SheetJS (parsing)
├── Python Environment → openpyxl (Excel) or pandas (data + Excel)
├── Heavy Data Processing → pandas with openpyxl engine
├── Complex Formatting → ExcelJS or openpyxl
├── Template-Based → Fill existing templates with data
└── Large Files → Streaming readers (ExcelJS streaming, pandas chunks)
Core Workflows
1. Excel Report Generation (Node.js)
- Initialize ExcelJS workbook
- Create worksheets with appropriate names
- Define columns with headers and widths
- Add data rows from source
- Apply styling (fonts, borders, fills)
- Add formulas for calculations
- Set print area and page setup
- Write to file buffer or stream
2. Spreadsheet Data Extraction (Python)
- Load workbook with openpyxl or pandas
- Identify data ranges and headers
- Handle merged cells and formatting
- Extract data into structured format
- Validate and clean extracted data
- Handle multiple sheets if needed
- Convert to desired output format
3. Template-Based Reporting
- Create master template with formatting and formulas
- Load template workbook
- Identify data insertion points
- Insert data while preserving formulas
- Update any date/reference cells
- Recalculate formulas if needed
- Save as new file (preserve template)
Best Practices
- Use streaming mode for large files to manage memory
- Preserve existing styles when modifying files
- Validate data types before writing to cells
- Handle merged cells explicitly
- Use named ranges for maintainability
- Test with actual Excel application, not just libraries
Anti-Patterns
- Loading huge files in memory → Use streaming readers
- Hardcoding cell references → Use named ranges or dynamic lookup
- Ignoring data types → Explicitly set number, date, text types
- Overwriting formulas → Check cell types before writing
- Missing error handling → Handle corrupted/password-protected files
Version History
- e0220ca Current 2026-07-05 21:20


