xlsx-processing
Skill1 starsChanged 5 months agoMITView on GitHub
Create, read, and modify Microsoft Excel (.xlsx) spreadsheets. Use when the user needs to generate reports, analyze tabular data, edit spreadsheets programmatically, or convert data to/from Excel format.
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- BrightGold70/skillstheir own version, first seen Nov 8, 2026
- peakdong68/my-skillstheir own version, first seen Aug 29, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- BrightGold70/skills★ 1same name
- peakdong68/my-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- ci-preflightSkill
- code-reviewSkill
- debugSkill
- docx-processingSkill
- github-publishSkill
- implementSkill
- pdf-processingSkill
- permission-modesSkill
- planSkill
- pptx-processingSkill
- refactorSkill
- security-testingSkill
- specSkill
- testSkill
- web-developmentSkill
The file
Files
XLSX 电子表格处理 Skill
在 Termux Android 上使用纯 JS 或 Python 工具处理 .xlsx 文件。
可用工具
方案 A: xlsx (SheetJS, Node.js, 推荐)
npm install xlsx适用于:创建、读取、修改、公式、样式
方案 B: openpyxl (Python)
pip install openpyxl适用于:复杂样式、图表、条件格式
常见操作 (Node.js + SheetJS)
1. 创建新的 XLSX 文件
import * as XLSX from 'xlsx'
const wb = XLSX.utils.book_new()
const data = [
['姓名', '年龄', '城市'],
['张三', 28, '北京'],
['李四', 32, '上海'],
]
const ws = XLSX.utils.aoa_to_sheet(data)
XLSX.utils.book_append_sheet(wb, ws, 'Sheet1')
XLSX.writeFile(wb, 'output.xlsx')2. 读取 JSON 数据源生成表格
const jsonData = [
{ name: '张三', score: 95 },
{ name: '李四', score: 87 },
]
const ws = XLSX.utils.json_to_sheet(jsonData)
const wb = XLSX.utils.book_new()
XLSX.utils.book_append_sheet(wb, ws, '成绩')
XLSX.writeFile(wb, 'grades.xlsx')3. 读取并解析
const wb = XLSX.readFile('input.xlsx')
const ws = wb.Sheets[wb.SheetNames[0]]
const data = XLSX.utils.sheet_to_json(ws) // 返回对象数组
const matrix = XLSX.utils.sheet_to_json(ws, { header: 1 }) // 返回二维数组4. 修改现有文件
const wb = XLSX.readFile('report.xlsx')
const ws = wb.Sheets['Sheet1']
XLSX.utils.sheet_add_aoa(ws, [['新数据', 100]], { origin: 'A5' })
XLSX.writeFile(wb, 'report_modified.xlsx')常见操作 (Python + openpyxl)
创建带样式的工作簿
from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill, Alignment
wb = Workbook()
ws = wb.active
ws.title = "数据"
# 表头样式
header_font = Font(bold=True, color="FFFFFF")
header_fill = PatternFill(start_color="4472C4", end_color="4472C4", fill_type="solid")
ws['A1'] = '姓名'; ws['B1'] = '分数'
for cell in ws[1]:
cell.font = header_font
cell.fill = header_fill
ws.append(['张三', 95])
ws.append(['李四', 87])
wb.save('styled.xlsx')格式 / 数据处理注意
| 场景 | 方法 |
| 读取日期 | XLSX.readFile 时设 { cellDates: true } |
| 处理公式 | sheet_to_json 用 { raw: false } 取值 |
| 列宽自动调整 | 手动计算最大字符宽度后设置 ws['!cols'] |
| 合并单元格 | openpyxl: ws.merge_cells('A1:C1') |
| 过滤器 / 冻结 | openpyxl: ws.auto_filter.ref, ws.freeze_panes |
注意事项
- 📐 SheetJS (
xlsx) 不支持保留样式;读取再写出会丢失颜色/字体 - ⚠️ 需要保留样式的修改,使用
openpyxl操作 - 📏 大文件 (>5MB) 优先用 openpyxl 的
read_only=True模式 - 🔄 中文编码自动处理,无需额外设置
- 💾 操作前先备份原文件
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

