← Back to Skills Marketplace
sqlskills

Excel Report

by SQLSkills · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
111
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install excel-report
Description
生成包含专业配色、公式自动刷新的多行业Excel可视化报表,支持批量处理与邮件发送。
README (SKILL.md)

Excel可视化报表生成器 (excel-report)\r

\r ---\r \r

简介\r

\r 一键生成大厂生产级 Excel 可视化报表的 OpenClaw Skill。\r \r 核心功能(v4.0 PRO):\r

  • ✅ Excel 公式替代硬编码(数据更新自动刷新)\r
  • ✅ 专业财务配色体系(深蓝表头 + 斑马纹)\r
  • ✅ 专业边框 + 数字格式\r
  • ✅ KPI 仪表盘自动计算\r
  • ✅ 多工作表报表输出\r
  • ✅ 批量生成 + 邮件发送\r
  • ✅ 智能列名映射(中英文)\r
  • ✅ 数据验证\r \r ---\r \r

支持的行业模板\r

\r | 行业 | 模板ID | 说明 |\r |------|--------|------|\r | 制造业 | production_daily | 生产产能日报表 |\r | 制造业 | quality_monthly | 生产质量月度报表 |\r | 零售业 | store_daily | 门店销售日报表 |\r | 零售业 | sales_monthly | 月度销售业绩分析报表 |\r | 金融业 | bank_revenue | 银行月度营收报表 |\r | 金融业 | securities_asset | 证券客户资产月度报表 |\r | 互联网 | app_dau | APP日活与留存报表 |\r | 互联网 | ecommerce_order | 电商平台订单月度报表 |\r | 医疗 | clinic_monthly | 医院门诊月度报表 |\r | 医疗 | equipment_ops | 医疗设备运维报表 |\r | 通用 | kpi_monthly | 月度KPI考核报表 |\r | 通用 | data_summary | 月度数据汇总报表 |\r \r ---\r \r

安装方法\r

\r

# 安装依赖\r
pip install openpyxl pandas\r
\r
# 安装 Skill(复制到 skills 目录)\r
~/.qclaw/skills/excel-report/\r
```\r
\r
---\r
\r
## 使用方法\r
\r
### 1. 列出模板\r
\r
```bash\r
python scripts/generate_report.py --list\r
```\r
\r
### 2. 生成报表\r
\r
```bash\r
# 基本用法\r
python scripts/generate_report.py -t \x3C模板ID> -d \x3C数据文件>\r
\r
# 示例\r
python scripts/generate_report.py -t store_daily -d sales.xlsx -o report.xlsx\r
python scripts/generate_report.py -t production_daily -d production.xlsx\r
```\r
\r
### 3. 批量生成\r
\r
```bash\r
python scripts/generate_report.py --batch --data-dir ./sample_data\r
```\r
\r
### 4. 邮件发送\r
\r
```bash\r
# 配置环境变量\r
export SMTP_HOST=smtp.gmail.com\r
export [email protected]\r
export SMTP_PASSWORD=xxx\r
\r
python scripts/generate_report.py -t store_daily -d sales.xlsx --email --to [email protected]\r
```\r
\r
---\r
\r
## 专业标准(参考 xlsx skill)\r
\r
### Excel 公式替代硬编码\r
\r
**KPI 使用 Excel 公式,数据更新后自动刷新:**\r
\r
```excel\r
=SUM('原始数据'!C2:C1000)           -- 总和\r
=AVG('原始数据'!E2:E1000)           -- 平均\r
=IFERROR(SUM(D2:D100)/SUM(C2:C100),"-")  -- 比率(含错误保护)\r
```\r
\r
### 专业配色体系\r
\r
| 元素 | 颜色 | 说明 |\r
|------|------|------|\r
| 表头背景 | #1F3864 | 深蓝色 |\r
| 表头文字 | #FFFFFF | 白色粗体 |\r
| KPI背景 | #DEEAF1 | 浅蓝色 |\r
| KPI数值 | #1F3864 | 深蓝色大字 |\r
| 数据奇数行 | #FFFFFF | 白色 |\r
| 数据偶数行 | #F2F2F2 | 浅灰(斑马纹) |\r
\r
### 专业边框\r
\r
| 位置 | 样式 |\r
|------|------|\r
| 表头底部 | 双线边框 |\r
| 数据区域 | 细线边框 |\r
| KPI卡片 | 粗外框 |\r
\r
### 数字格式\r
\r
| 类型 | 格式 | 示例 |\r
|------|------|------|\r
| 货币 | `¥#,##0.00` | ¥1,234.56 |\r
| 百分比 | `0.0%` | 95.5% |\r
| 整数 | `#,##0` | 1,234 |\r
| 负数 | `(#,##0)` | (1,234) |\r
\r
### 功能保障\r
\r
- **冻结窗格**:数据表冻结首行\r
- **自动筛选**:数据表开启筛选\r
- **IFERROR**:所有除法公式加错误保护\r
- **列宽自适应**:根据内容调整\r
\r
---\r
\r
## 数据文件格式\r
\r
### 支持格式\r
- **xlsx** - Excel 2007+(推荐)\r
- **csv** - 自动识别 UTF-8/GBK 编码\r
- **json** - JSON 数组\r
\r
### 列名智能映射\r
\r
无需严格匹配,系统自动识别:\r
- 日期 / Date / 统计日期\r
- 销售额 / Sales / 销售金额\r
\r
---\r
\r
## 输出报表结构\r
\r
```\r
Sheet1: 原始数据\r
  - 专业表头(深蓝+白色粗体)\r
  - 斑马纹数据行\r
  - 冻结首行 + 自动筛选\r
  - 数字格式(货币/百分比)\r
\r
Sheet2: 分析看板\r
  - 大标题\r
  - KPI 卡片(Excel 公式)\r
  - 可视化图表\r
\r
Sheet3: 明细数据\r
  - 专业样式明细表\r
```\r
\r
---\r
\r
## KPI 公式语法\r
\r
```javascript\r
SUM(field)              // 求和\r
AVG(field)              // 平均值\r
COUNT(field)            // 计数\r
SUM(a)/SUM(b)           // 比率(自动加 IFERROR)\r
COUNT_DISTINCT(field)   // 去重计数\r
```\r
\r
---\r
\r
## 文件结构\r
\r
```\r
excel-report/\r
├── SKILL.md                    # 本文件\r
├── scripts/\r
│   └── generate_report.py     # 主入口 (v4.0 PRO)\r
├── templates/                  # 12个行业模板\r
│   ├── manufacturing/ (2)\r
│   ├── retail/ (2)\r
│   ├── finance/ (2)\r
│   ├── internet/ (2)\r
│   ├── medical/ (2)\r
│   └── general/ (2)\r
├── styles/\r
│   └── themes.json            # 配色主题\r
├── sample_data/               # 示例数据\r
└── output/                    # 输出目录\r
```\r
\r
---\r
\r
## 命令行参数\r
\r
| 参数 | 说明 |\r
|------|------|\r
| `--list` | 列出所有模板 |\r
| `-t \x3CID>` | 指定模板 |\r
| `-d \x3Cfile>` | 数据文件 |\r
| `-o \x3Cfile>` | 输出路径 |\r
| `--batch` | 批量生成 |\r
| `--email --to \x3Caddr>` | 发送邮件 |\r
\r
---\r
\r
## 更新日志\r
\r
- **2026-03-31 v4.0 PRO**\r
  - Excel 公式替代硬编码\r
  - 专业财务配色体系\r
  - 斑马纹 + 专业边框\r
  - 数字格式标准化\r
  - 冻结窗格 + 自动筛选\r
  - IFERROR 零错误保障\r
\r
- **2026-03-31 v3.0**\r
  - 批量生成模式\r
  - 邮件发送支持\r
  - 数据匹配优化\r
\r
- **2026-03-30 v2.0**\r
  - 12个行业模板\r
  - 32个图表\r
Usage Guidance
What to consider before installing: - The package appears to do what it claims (parse data, apply templates, build charts, save Excel files). The code is local Python — no remote downloads — which reduces risk. - If you plan to use the email feature: it requires SMTP_HOST / SMTP_USER / SMTP_PASSWORD (not listed in the registry metadata). Providing SMTP credentials lets the script connect to that SMTP server and send attachments; use a dedicated, limited mailbox (not your primary account) and strong, revocable credentials. - Review generate_report.py's email logic before using to confirm which files it attaches and which recipient addresses it allows (ensure it only sends intended reports and cannot be tricked into attaching arbitrary local files). - The SKILL.md omits the optional rapidfuzz dependency used for fuzzy column mapping; if you rely on fuzzy matching, install rapidfuzz or expect degraded mapping behavior. - Run the skill first in a sandbox or on non-sensitive sample data to confirm behavior (where the output directory is SKILL_DIR/output). Check logs/output for unexpected network activity. - If you need the registry metadata to reflect runtime needs, ask the skill author to declare the SMTP env vars (and any other optional dependencies) so capability and required credentials are explicit. If you want, I can: (a) point to the exact lines where SMTP env vars and email-sending behavior occur in generate_report.py, (b) extract and summarize the email send routine, or (c) list all places the code reads files and environment variables.
Capability Analysis
Type: OpenClaw Skill Name: excel-report Version: 1.0.0 The skill bundle contains multiple critical security vulnerabilities that could lead to Remote Code Execution (RCE). Specifically, `scripts/template_engine.py` uses the `eval()` function to process formulas defined in JSON templates, which allows for arbitrary code execution if a template is malicious. Additionally, `scripts/generate_report.py` employs `subprocess.Popen` with `shell=True` to open output files, creating a command injection vector through the `--output` argument. While the bundle appears to be a legitimate tool for Excel report generation, these high-risk coding practices are unsafe for processing untrusted data.
Capability Assessment
Purpose & Capability
The name/description (Excel visual reports, templates, batch output, email) align with the included Python modules (data_parser, template_engine, chart_builder, generate_report) and JSON templates. However registry metadata declares no required environment variables while the SKILL.md and generate_report.py expect SMTP_HOST/SMTP_USER/SMTP_PASSWORD for the email feature. Also rapidfuzz is optionally used by data_parser if installed but is not mentioned in SKILL.md.
Instruction Scope
SKILL.md instructs running the included Python scripts on local data files and, if emailing is used, to set SMTP_* env vars. The runtime instructions only reference local paths within the skill (templates, sample_data, output) and standard Python libraries. They do not instruct reading unrelated system paths. Note: the email feature will transmit generated files (attachments) to external SMTP servers when used.
Install Mechanism
There is no automated install spec or remote download; this is instruction-plus-bundled-code. All code is plain Python shipped in the skill bundle (no obfuscated or remote fetch). Risk from installation is low, but installing the bundle writes these scripts and templates to disk (the SKILL.md suggests placing it under ~/.qclaw/skills/excel-report/).
Credentials
The skill requires SMTP credentials to enable its email-sending feature (SKILL.md: SMTP_HOST, SMTP_USER, SMTP_PASSWORD) but the registry's required-env list is empty—this mismatch should be corrected. Aside from SMTP credentials, the skill does not request unrelated secrets (no cloud/AWS/etc.). The email credentials are proportional to the stated feature but are sensitive and grant the skill ability to send files externally.
Persistence & Privilege
The skill does not request always:true or elevated agent/system privileges. It does not modify other skills or global agent settings. Normal autonomous model invocation is allowed (platform default).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install excel-report
  3. After installation, invoke the skill by name or use /excel-report
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release: Excel可视化报表生成器 Skill v1.0.0 - 支持大厂级别Excel报表一键生成,含丰富行业模板与自动配色 - 完善命令行工具、数据格式兼容、报表输出结构明晰 - 简明上手说明,涵盖模板调用、批量生成和邮件发送 - 输出专业风格报表,内置KPI公式与智能列名映射
Metadata
Slug excel-report
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Excel Report?

生成包含专业配色、公式自动刷新的多行业Excel可视化报表,支持批量处理与邮件发送。 It is an AI Agent Skill for Claude Code / OpenClaw, with 111 downloads so far.

How do I install Excel Report?

Run "/install excel-report" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Excel Report free?

Yes, Excel Report is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Excel Report support?

Excel Report is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Excel Report?

It is built and maintained by SQLSkills (@sqlskills); the current version is v1.0.0.

💬 Comments