Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
texiaoyao avatar

Office Automation

  • 3k installs
  • 6 repo stars
  • Updated February 22, 2026
  • texiaoyao/office-automation-skill

office-automation is a skill that runs Python scripts to read, write, fill templates, and analyze Word and Excel files so agents can automate document and spreadsheet workflows.

About

office-automation is a texiaoyao skill that automates Word and Excel file handling through Python scripts in skills/office-automation/scripts using python-docx, openpyxl, and pandas. Installation requires pip install python-docx openpyxl pandas and python3 on PATH per OpenClaw metadata. word_processor.py exposes read, write, template fill with JSON data replacing variables, extract tables to CSV, and format commands for .docx files only. excel_processor.py covers read with sheet selection, write from JSON data, merge of multiple workbooks, convert between Excel and CSV, and analyze with pivot-style statistics. Documented scenarios include batch report generation, template contract filling, table extraction, data merging, and format conversion. Notes specify .docx only for Word, .xlsx and .xlsm for Excel, UTF-8 encoding, and batching files over 100MB. Developers reach for office-automation when agents must replace manual spreadsheet and document copy-paste with repeatable CLI-driven office file workflows.

  • word_processor.py: read, write, template, extract, and format commands for .docx.
  • excel_processor.py: read, write, merge, convert, and analyze commands for Excel files.
  • Depends on python-docx, openpyxl, and pandas installed via pip.
  • Template fill replaces variables with JSON --data payloads.
  • Supports batch merges, CSV extraction, and UTF-8 encoded outputs.

Office Automation by the numbers

  • 2,968 all-time installs (skills.sh)
  • +5 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #152 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
At a glance

office-automation capabilities & compatibility

Capabilities
read and write .docx word documents · fill templates with json variable substitution · read, write, merge, and convert excel workbooks · extract docx tables and run excel analysis comma
From the docs

What office-automation says it does

使用 Python 脚本自动化处理 Word (.docx) 和 Excel (.xlsx/xlsm) 文件。
SKILL.md
pip install python-docx openpyxl pandas
SKILL.md
template doc.docx --data '{"key": "value"}'
SKILL.md
npx skills add https://github.com/texiaoyao/office-automation-skill --skill office-automation

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3k
repo stars6
Security audit3 / 3 scanners passed
Last updatedFebruary 22, 2026
Repositorytexiaoyao/office-automation-skill

How do I batch-generate Word reports, fill Excel templates, or merge spreadsheets without manual copy-paste?

Automate Word and Excel read, write, template fill, merge, and analysis tasks with Python CLI scripts.

Who is it for?

Teams automating recurring Word and Excel tasks with Python when .docx and .xlsx files are the source and destination formats.

Skip if: Skip for legacy .doc-only files, GUI macro recording, or workloads needing real-time collaborative editing instead of file scripts.

When should I use this skill?

User asks to read or write Word or Excel files, fill a document template, merge spreadsheets, or convert Excel to CSV.

What you get

Formatted .docx or .xlsx outputs, extracted CSV tables, merged workbooks, or analysis results from CLI script commands.

  • Generated documents
  • Merged spreadsheets
  • Extracted CSV data

By the numbers

  • Requires 3 Python packages: python-docx, openpyxl, pandas
  • Supports Word .docx and Excel .xlsx/.xlsm file formats

Files

SKILL.mdMarkdownGitHub ↗

Office 自动化技能

使用 Python 脚本自动化处理 Word (.docx) 和 Excel (.xlsx/xlsm) 文件。

快速开始

1. 安装依赖

pip install python-docx openpyxl pandas

2. 基本用法

处理 Word 文档:

python scripts/word_processor.py read document.docx
python scripts/word_processor.py write output.docx --content "Hello World"
python scripts/word_processor.py template fill.docx --data '{"name": "张三", "date": "2026-02-22"}'

处理 Excel 表格:

python scripts/excel_processor.py read data.xlsx
python scripts/excel_processor.py write output.xlsx --sheet "Sheet1"
python scripts/excel_processor.py merge folder/ --output merged.xlsx

---

脚本说明

word_processor.py

命令说明示例
read读取 Word 文档内容read file.docx
write创建新文档write out.docx --content "文本"
template填充模板(替换 {{变量}})template doc.docx --data '{"key": "value"}'
extract提取表格到 CSVextract file.docx --table 1
format格式化文档format file.docx --style heading

excel_processor.py

命令说明示例
read读取 Excel 数据read data.xlsx --sheet Sheet1
write写入数据到 Excelwrite out.xlsx --data data.json
merge合并多个 Excel 文件merge folder/ --output all.xlsx
convertExcel ↔ CSV 转换convert file.xlsx --to csv
analyze数据分析(统计、透视)analyze sales.xlsx --pivot

---

使用场景

Word 处理

  • 📝 批量生成报告/合同
  • 📋 填充模板文档
  • 📊 提取文档中的表格数据
  • 🎨 统一文档格式

Excel 处理

  • 📈 数据汇总和合并
  • 🔄 格式转换(Excel ↔ CSV)
  • 📊 数据分析和统计
  • 📋 批量处理多个表格

---

注意事项

1. Word 格式:仅支持 .docx 格式(不支持旧版 .doc) 2. Excel 格式:支持 .xlsx 和 .xlsm 3. 编码:默认使用 UTF-8 编码 4. 大文件:超过 100MB 的文件建议分批次处理

---

脚本位置

所有脚本位于 skills/office-automation/scripts/ 目录。

使用时请确保从技能目录或 workspace 根目录运行。

Related skills

How it compares

Choose office-automation over generic Python skills when you need opinionated Word and Excel scripting patterns with declared docx/xlsx dependencies.

FAQ

Which file formats does office-automation support?

Word .docx only and Excel .xlsx or .xlsm with UTF-8 encoding by default.

How do I fill a Word template?

Run word_processor.py template with --data JSON to replace template variables in the document.

What Python packages are required?

python-docx, openpyxl, and pandas installed with pip alongside python3 on PATH.

Is Office Automation safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.