Excel Generator Skill
Generate professional, Bloomberg-terminal-aesthetic Excel workbooks using Python + openpyxl.
When to Use
- - User asks to build an Excel file, spreadsheet, dashboard, tracker, or report
- User wants to convert data into a formatted Excel workbook
- User needs a business template (inventory, finance, project tracking, HR, etc.)
How to Use
Step 1: Understand the Request
Ask (or infer) from the user:
- - What type of workbook? (inventory, financial model, dashboard, tracker, etc.)
- What data/sheets are needed?
- Any specific metrics, KPIs, or calculations?
Step 2: Generate the Workbook
Run the Python generator script:
CODEBLOCK0
Or write a custom Python script using openpyxl with the style constants below.
Step 3: Style Constants (Bloomberg Aesthetic)
Always use these colors for consistency:
CODEBLOCK1
Step 4: Standard Sheet Structure
Every workbook should include:
- 1. Dashboard — KPI cards + summary table (always first sheet)
- Data sheets — specific to the workbook type
- Raw Data (if applicable) — source data tab
Step 5: Deliver
- - Save to INLINECODE0
- For client delivery: create a password-protected version with
Formly2026! as default password - Tell the user the file location and what's included
Workbook Templates Available
Inventory System
Sheets: Dashboard, Stock (with barcode input), Raw Materials, Projects, Deliveries, Suppliers, Offcuts, Analytics, Barcode Guide
Key features: Auto status formulas (✅ OK / ⚠️ LOW / 🔴 OUT), SUMIF analytics, conditional formatting
Financial Dashboard
Sheets: Dashboard, P&L, Cash Flow, Budget vs Actual, KPIs
Key features: Variance calculations, sparklines, YTD comparisons
Project Tracker
Sheets: Dashboard, Tasks (Kanban), Timeline, Resources, Budget
Key features: RAG status, completion %, budget tracking
HR/Headcount
Sheets: Dashboard, Roster, Org Chart data, Compensation, Time Off
Key features: Department rollups, cost calculations
Sales Pipeline
Sheets: Dashboard, Pipeline, Won/Lost, Forecasting, Rep Performance
Key features: Weighted pipeline, close rate tracking
Example Prompts This Skill Handles
- - "Build me an inventory tracking spreadsheet"
- "Create a financial dashboard for my SaaS"
- "Make an Excel tracker for my construction projects"
- "I need a sales pipeline spreadsheet"
- "Generate a HR headcount report template"
Output Quality Standards
- - Minimum 3 sheets per workbook
- Always include a Dashboard as Sheet 1
- Freeze panes on all data sheets
- Alternating row colors (ICE/WHITE)
- Bold navy headers with white text
- All number columns right-aligned with proper formatting ($, %, commas)
- Column widths sized to content
Excel 生成器技能
使用 Python + openpyxl 生成具有彭博终端美学风格的专业 Excel 工作簿。
使用场景
- - 用户要求创建 Excel 文件、电子表格、仪表板、跟踪表或报告
- 用户希望将数据转换为格式化的 Excel 工作簿
- 用户需要业务模板(库存、财务、项目跟踪、人力资源等)
使用方法
步骤 1:理解需求
向用户询问(或推断):
- - 需要什么类型的工作簿?(库存、财务模型、仪表板、跟踪表等)
- 需要哪些数据/工作表?
- 是否有特定的指标、KPI 或计算?
步骤 2:生成工作簿
运行 Python 生成器脚本:
bash
cd /Users/synapsefirm/.openclaw/workspace && python3 scripts/excel_generator.py \
--type [工作簿类型] \
--output excel-projects/[文件名].xlsx \
--title [标题]
或使用 openpyxl 编写自定义 Python 脚本,并应用以下样式常量。
步骤 3:样式常量(彭博美学)
始终使用以下颜色以保持一致性:
python
NAVY = 0D1B2A # 主标题
NAVY_MID = 1B3A5C # 副标题
STEEL = 2D5986 # 强调色
ICE = E8F0F8 # 交替行色
GOLD = C9A84C # 分区线
GREEN_SAFE = 217346 # 正常/积极状态
AMBER = B8560A # 警告状态
CRIMSON = A50000 # 危险/消极状态
WHITE = FFFFFF
步骤 4:标准工作表结构
每个工作簿应包含:
- 1. 仪表板 — KPI 卡片 + 汇总表(始终为第一个工作表)
- 数据工作表 — 根据工作簿类型定制
- 原始数据(如适用)— 源数据标签页
步骤 5:交付
- - 保存至 /Users/synapsefirm/.openclaw/workspace/excel-projects/[文件名].xlsx
- 如需交付给客户:创建密码保护版本,默认密码为 Formly2026!
- 告知用户文件位置及包含内容
可用工作簿模板
库存管理系统
工作表:仪表板、库存(含条码输入)、原材料、项目、交付、供应商、边角料、分析、条码指南
主要功能:自动状态公式(✅ 正常 / ⚠️ 偏低 / 🔴 缺货)、SUMIF 分析、条件格式
财务仪表板
工作表:仪表板、损益表、现金流量表、预算与实际对比、KPI
主要功能:差异计算、迷你图、年度累计比较
项目跟踪表
工作表:仪表板、任务(看板)、时间线、资源、预算
主要功能:红黄绿状态、完成百分比、预算跟踪
人力资源/人员编制
工作表:仪表板、花名册、组织架构数据、薪酬、休假
主要功能:部门汇总、成本计算
销售管道
工作表:仪表板、管道、赢单/输单、预测、销售代表绩效
主要功能:加权管道、成交率跟踪
本技能处理的示例提示
- - 帮我建一个库存跟踪电子表格
- 为我的 SaaS 创建一个财务仪表板
- 为我的建筑项目制作一个 Excel 跟踪表
- 我需要一个销售管道电子表格
- 生成一个人力资源人员编制报告模板
输出质量标准
- - 每个工作簿至少包含 3 个工作表
- 始终将仪表板作为工作表 1
- 所有数据工作表冻结窗格
- 交替行颜色(ICE/WHITE)
- 粗体海军蓝标题搭配白色文字
- 所有数字列右对齐并设置适当格式($、%、逗号)
- 列宽根据内容调整