Office Automation Skill for OpenClaw - Automate Word and Excel processing
npx skills add https://github.com/texiaoyao/office-automation-skill --skill office-automationInstala esta habilidad con la CLI y comienza a usar el flujo de trabajo SKILL.md en tu espacio de trabajo.
自动化处理 Word 和 Excel 文件的 OpenClaw 技能
Automate Word and Excel document processing with OpenClaw
pip install python-docx openpyxl pandas
# Word 测试 / Word Test
python scripts/word_processor.py write test.docx --content "Hello World" --title "Test"
# Excel 测试 / Excel Test
python scripts/excel_processor.py write test.xlsx --data '[["Name","Age"],["Alice",25]]' --headers "Name,Age"
| 文档 | 说明 |
|---|---|
| 使用指南 | 完整的使用教程和命令参考 |
| 示例集合 | 实战案例和代码示例 |
| API 参考 | Python API 详细文档 |
python scripts/word_processor.py template contract.docx \
--output contract_filled.docx \
--data '{"name":"张三","date":"2026-02-22"}'
python scripts/excel_processor.py merge ./reports/ --output all.xlsx
python scripts/batch_processor.py templates \
--folder ./output \
--template invitation.docx \
--data attendees.json
office-automation/
├── SKILL.md # OpenClaw 技能定义
├── README.md # 本文件
├── LICENSE # MIT 许可证
├── .gitignore # Git 忽略文件
├── scripts/
│ ├── word_processor.py # Word 处理脚本
│ ├── excel_processor.py # Excel 处理脚本
│ └── batch_processor.py # 批量处理脚本
├── references/
│ └── office_api.md # API 参考文档
├── docs/
│ ├── 使用指南.md # 使用教程
│ └── 示例集合.md # 示例代码
└── examples/
└── sample_data.json # 示例数据
| 命令 | 说明 |
|---|---|
read <file> |
读取文档内容 |
write <output> --content "文本" |
创建新文档 |
template <文件> --output <输出> --data 'JSON' |
填充模板 |
extract <文件> --table 0 |
提取表格到 CSV |
| 命令 | 说明 |
|---|---|
read <file> --sheet Sheet1 |
读取 Excel |
write <output> --data 'JSON' |
写入数据 |
merge <文件夹> --output <输出> |
合并文件 |
convert <文件> --to csv/xlsx |
格式转换 |
analyze <文件> |
数据分析 |
| 命令 | 说明 |
|---|---|
templates --folder --template --data |
批量填充模板 |
convert --folder --from --to --output |
批量转换格式 |
extract --folder --output |
批量提取表格 |
python scripts/batch_processor.py templates \
--folder ./contracts \
--template contract_template.docx \
--data clients.json
python scripts/excel_processor.py merge ./monthly_reports/ \
--output yearly_report.xlsx
# 提取 Word 表格
python scripts/word_processor.py extract report.docx
# 分析 Excel 数据
python scripts/excel_processor.py analyze sales.xlsx
在 OpenClaw 聊天中直接使用:
请帮我读取 document.docx 的内容
从 data.xlsx 提取销售数据
批量生成 100 份合同,数据在 data.json 中
本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。
Made with ❤️ for OpenClaw Community