| name | business-report-cn |
| description | 根据数据、关键指标自动生成中文商务周报/月报/季报,图表与文字一体输出,支持多种行业模板,可导出为 Word/PDF/Markdown。 |
| version | 1.0.0 |
| metadata | {"openclaw":{"os":["darwin","linux","win32"],"emoji":"📊","user-invocable":true,"homepage":"https://github.com/Allen091080/business-report-cn","tags":["business","office","report","data","chinese"]}} |
中文商务报告生成器
输入关键业务数据,自动生成专业的中文商务报告(周报/月报/季报),含图表分析、趋势解读、问题归因、下阶段计划,一键导出可用的 Word/PDF 文件。
适用场景
| 场景 | 用这个? |
|---|
| 生成销售周报/月报 | ✅ 是 |
| 生成运营数据报告 | ✅ 是 |
| 生成财务简报 | ✅ 是 |
| 生成项目进度报告 | ✅ 是 |
| 数据可视化图表 | ✅ 是 |
| 自动撰写分析文字 | ✅ 是 |
| BI 系统/大屏 | ❌ 否 |
报告结构(默认模板)
[公司/部门名称] [报告类型] — [时间段]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
一、核心指标概览
本期 vs 上期 vs 目标(红绿灯标注)
二、详细数据分析
[图表] 趋势走势
[图表] 分类对比
文字解读:上涨/下跌的原因分析
三、亮点与问题
✅ 亮点:本期做得好的地方
⚠️ 问题:需要关注的异常
四、下阶段计划
目标 / 措施 / 责任人
五、附录
原始数据表
如何使用
1. 从 CSV/Excel 数据生成报告
python3 {baseDir}/scripts/report.py --data /path/to/sales_data.csv --type monthly --month 2026-03
python3 {baseDir}/scripts/report.py --data /path/to/data.xlsx --type weekly --week 2026-W11
2. 直接输入数据(命令行)
python3 {baseDir}/scripts/report.py --metrics '{
"本月营收": 1250000,
"上月营收": 1100000,
"目标营收": 1200000,
"新增客户": 45,
"客户流失": 3,
"订单量": 328
}' --type monthly --month 2026-03 --dept "销售部"
3. 选择行业模板
python3 {baseDir}/scripts/report.py --list-templates
python3 {baseDir}/scripts/report.py --data data.csv --template sales --type monthly
python3 {baseDir}/scripts/report.py --data data.csv --template ecommerce --type weekly
4. 导出格式
python3 {baseDir}/scripts/report.py --data data.csv --format docx --output ~/reports/
python3 {baseDir}/scripts/report.py --data data.csv --format pdf --output ~/reports/
python3 {baseDir}/scripts/report.py --data data.csv --format markdown --output ~/reports/
python3 {baseDir}/scripts/report.py --data data.csv --format docx --with-charts --output ~/reports/
5. 自定义公司信息
python3 {baseDir}/scripts/report.py config \
--company "某某科技有限公司" \
--dept "电商运营部" \
--author "张三" \
--logo /path/to/logo.png
与 AI Agent 对话示例
用户:帮我生成3月份的销售月报,数据如下:
本月销售额 125万,上月 110万,目标 120万
新签客户 45 家,流失 3 家,订单量 328 单
区域:华东 52万,华南 38万,华北 35万
Agent:正在生成销售月报...
📊 销售部 2026年3月月报
一、核心指标概览
┌──────────┬──────────┬──────────┬──────────┬────┐
│ 指标 │ 本月 │ 上月 │ 目标 │ 状态│
├──────────┼──────────┼──────────┼──────────┼────┤
│ 销售额 │ 125万 │ 110万 │ 120万 │ ✅ │
│ 新签客户 │ 45家 │ — │ — │ — │
│ 净增客户 │ +42家 │ — │ — │ ✅ │
│ 订单量 │ 328单 │ — │ — │ — │
└──────────┴──────────┴──────────┴──────────┴────┘
[附环比增长图、区域对比饼图]
二、分析
本月销售额125万,超额完成目标(104.2%),
环比增长13.6%。华东区贡献最大(41.6%)...
已导出:~/reports/sales_report_202603.docx
用户:加上和去年同期的对比
Agent:[重新生成报告,加入同比数据对比]
重要规则
- 中文图表字体设置(防止乱码):
import matplotlib; matplotlib.use('Agg')
import matplotlib.pyplot as plt
plt.rcParams['font.family'] = 'PingFang HK'
- 红绿灯标注规则:
- ✅ 绿:达成率 ≥ 100%
- 🟡 黄:达成率 80%-99%
- 🔴 红:达成率 < 80%
- 自动分析文字要有依据,数字支撑,不写无根据的主观判断
- 导出 Word/PDF 需要安装:
pip3 install python-docx matplotlib pandas
- 金额格式:≥10000 用"万元",<10000 用"元",保留 1 位小数
- 环比/同比计算方式:
(本期 - 上期) / 上期 × 100%