零代码Excel周度报表自动化
简介
基于Power Query的Excel周度KPI仪表板设计技能,实现CSV/XLSX文件夹自动刷新、数据验证与透视报表,零代码执行风险。
原始描述
Designs refreshable Excel dashboards (Power Query structured tables validation pivot reporting). Use when you need a repeatable weekly KPI workbook that updates from files with minimal manual work.
通过你的 Agent 添加
安装目录:excel-weekly-dashboard/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
本Skill专注于设计可刷新的Excel周度仪表板,核心架构采用Power Query数据管道+结构化表+验证规则+透视报表四层设计。用户只需将周度CSV/XLSX文件放入指定文件夹,点击刷新即可自动完成数据合并、清洗、验证与报表更新,无需手动复制粘贴或调整公式。
具体工作流程包括:识别数据源类型(CSV/XLSX/DOCX/PDF导出表)→定义规范表结构(字段类型、必填项、允许值)→设计Power Query摄取管道(推荐文件夹批量合并+防御性缺失列处理)→构建数据清洗层(Data_Staging原始层+Data_Clean验证层,含IsValidPayNumber等验证标志列)→搭建透视报表层(带年份/ISO周切片器的动态仪表板)→添加刷新状态监控页(时间戳、行数统计、错误标志)。
显著优点
自动化程度高:一次配置后,新增周度文件仅需点击刷新,彻底消除手工操作错误。防御性设计完善:内置缺失列处理、列名标准化(去空格、统一大小写)、数据验证标志列,确保数据源结构变化时报表不崩溃。透明可审计:所有转换步骤在Power Query编辑器中可视化,便于排查问题。轻量易部署:无需BI工具许可或服务器,纯Excel环境即可运行,适合中小团队快速落地。
潜在缺点与局限性
功能边界明确:不支持高级预测建模、估值计算或复杂财务模型,专注 repeatable reporting pipeline。数据源依赖本地文件:无法直接连接数据库或API,需先导出为CSV/XLSX;PDF/DOCX表格需用户预处理为可提取格式。Power Query性能瓶颈:当单文件超过百万行或文件夹内文件极多时,刷新速度显著下降。版本兼容性:部分M代码特性需Excel 2016及以上版本支持。
适合的目标群体
- 运营/财务分析师:需每周从业务系统导出数据制作KPI追踪表
- 中小型企业数据管理员:无BI工具预算,希望用Excel实现半自动化报表
- 项目经理:需要多维度切片器(年份、周次、区域)的动态项目进度仪表板
- 数据治理初学者:希望学习Power Query最佳实践与防御性数据清洗模式
使用风险
路径配置风险:Power Query模板中的文件夹路径需用户手动替换,误配可能导致刷新失败或读取错误目录。数据隐私责任:虽Skill本身不上传数据,但用户需确保输入文件不含未授权敏感信息。依赖项稳定性:Power Query为Excel内置功能,但不同版本(Windows/Mac/网页版)存在功能差异,复杂转换可能在Mac版中受限。无实时预警机制:需定期查看Refresh_Status页的错误标志,无法主动推送数据异常通知。
技能正文
name: excel-weekly-dashboard
description: Designs refreshable Excel dashboards (Power Query + structured tables + validation + pivot reporting). Use when you need a repeatable weekly KPI workbook that updates from files with minimal manual work.
Excel weekly dashboards at scale
PURPOSE
PURPOSE
Designs refreshable Excel dashboards (Power Query + structured tables + validation + pivot reporting).
WHEN TO USE
- TRIGGERS:
- Build me a Power Query pipeline for this file so it refreshes weekly with no manual steps.
- Turn this into a structured table with validation lists and clean data entry rules.
- Create a pivot-driven weekly dashboard with slicers for year and ISO week.
- Fix this Excel model so refresh does not break when new columns appear.
- Design a reusable KPI pack that updates from a folder of CSVs.
- DO NOT USE WHEN…
- You need advanced forecasting/valuation modeling (this skill is for repeatable reporting pipelines).
- You need a BI tool build (Power BI/Tableau) rather than Excel.
- You need web scraping as the primary ingestion method.
INPUTS
- REQUIRED:
- Source data file(s): CSV, XLSX, DOCX-exported tables, or PDF-exported tables (provided by user).
- Definition of ‘week’ (ISO week preferred) and the KPI fields required.
- OPTIONAL:
- Data dictionary / column definitions.
- Known “bad data” patterns to validate (e.g., blank PayNumber, invalid dates).
- Existing workbook to refactor.
- EXAMPLES:
- Folder of weekly CSV exports:
exports/2026-W02/*.csv
- Single XLSX dump with changing columns month to month
OUTPUTS
- If asked for plan only (default): a step-by-step build plan + Power Query steps + sheet layout + validation rules.
- If explicitly asked to generate artifacts:
workbook_spec.md (workbook structure and named tables)
power_query_steps.pq (M code template)
refresh-checklist.md (from assets/)
Success = refresh works after adding a new week’s files without manual edits, and validation catches bad rows.
WORKFLOW
- Identify source type(s) (CSV/XLSX/DOCX/PDF-export) and the stable business keys (e.g., PayNumber).
- Define the canonical table schema:
- required columns, types, allowed values, and “unknown” handling.
- Design ingestion with Power Query:
- Prefer Folder ingest + combine, with defensive “missing column” handling.
- Normalize column names (trim, case, collapse spaces).
- Design cleansing & validation:
- Create a Data_Staging query (raw-normalized) and Data_Clean query (validated).
- Add validation columns (e.g.,
IsValidPayNumber, IsValidDate, IssueReason).
- Build reporting layer:
- Pivot table(s) off Data_Clean
- Slicers: Year, ISOWeek; plus operational dimensions
- Add a “Refresh Status” sheet:
- last refresh timestamp, row counts, query error flags, latest week present
- STOP AND ASK THE USER if:
- required KPIs/columns are unspecified,
- the source files don’t include any stable key,
- week definition/timezone rules are unclear,
- PDF/DOCX tables are not reliably extractable without a provided export.
OUTPUT FORMAT
- Build me a Power Query pipeline for this file so it refreshes weekly with no manual steps.
- Turn this into a structured table with validation lists and clean data entry rules.
- Create a pivot-driven weekly dashboard with slicers for year and ISO week.
- Fix this Excel model so refresh does not break when new columns appear.
- Design a reusable KPI pack that updates from a folder of CSVs.
- You need advanced forecasting/valuation modeling (this skill is for repeatable reporting pipelines).
- You need a BI tool build (Power BI/Tableau) rather than Excel.
- You need web scraping as the primary ingestion method.
- REQUIRED:
- Source data file(s): CSV, XLSX, DOCX-exported tables, or PDF-exported tables (provided by user).
- Definition of ‘week’ (ISO week preferred) and the KPI fields required.
- OPTIONAL:
- Data dictionary / column definitions.
- Known “bad data” patterns to validate (e.g., blank PayNumber, invalid dates).
- Existing workbook to refactor.
- EXAMPLES:
- Folder of weekly CSV exports:
exports/2026-W02/*.csv - Single XLSX dump with changing columns month to month
- Folder of weekly CSV exports:
OUTPUTS
- If asked for plan only (default): a step-by-step build plan + Power Query steps + sheet layout + validation rules.
- If explicitly asked to generate artifacts:
workbook_spec.md (workbook structure and named tables)
power_query_steps.pq (M code template)
refresh-checklist.md (from assets/)
Success = refresh works after adding a new week’s files without manual edits, and validation catches bad rows.
WORKFLOW
- Identify source type(s) (CSV/XLSX/DOCX/PDF-export) and the stable business keys (e.g., PayNumber).
- Define the canonical table schema:
- required columns, types, allowed values, and “unknown” handling.
- Design ingestion with Power Query:
- Prefer Folder ingest + combine, with defensive “missing column” handling.
- Normalize column names (trim, case, collapse spaces).
- Design cleansing & validation:
- Create a Data_Staging query (raw-normalized) and Data_Clean query (validated).
- Add validation columns (e.g.,
IsValidPayNumber, IsValidDate, IssueReason).
- Build reporting layer:
- Pivot table(s) off Data_Clean
- Slicers: Year, ISOWeek; plus operational dimensions
- Add a “Refresh Status” sheet:
- last refresh timestamp, row counts, query error flags, latest week present
- STOP AND ASK THE USER if:
- required KPIs/columns are unspecified,
- the source files don’t include any stable key,
- week definition/timezone rules are unclear,
- PDF/DOCX tables are not reliably extractable without a provided export.
OUTPUT FORMAT
workbook_spec.md(workbook structure and named tables)power_query_steps.pq(M code template)refresh-checklist.md(fromassets/) Success = refresh works after adding a new week’s files without manual edits, and validation catches bad rows.
- Identify source type(s) (CSV/XLSX/DOCX/PDF-export) and the stable business keys (e.g., PayNumber).
- Define the canonical table schema:
- required columns, types, allowed values, and “unknown” handling.
- Design ingestion with Power Query:
- Prefer Folder ingest + combine, with defensive “missing column” handling.
- Normalize column names (trim, case, collapse spaces).
- Design cleansing & validation:
- Create a Data_Staging query (raw-normalized) and Data_Clean query (validated).
- Add validation columns (e.g.,
IsValidPayNumber,IsValidDate,IssueReason).
- Build reporting layer:
- Pivot table(s) off Data_Clean
- Slicers: Year, ISOWeek; plus operational dimensions
- Add a “Refresh Status” sheet:
- last refresh timestamp, row counts, query error flags, latest week present
- STOP AND ASK THE USER if:
- required KPIs/columns are unspecified,
- the source files don’t include any stable key,
- week definition/timezone rules are unclear,
- PDF/DOCX tables are not reliably extractable without a provided export.
OUTPUT FORMAT
When producing a plan, use this template:
WORKBOOK PLAN
- Sheets:
- Data_Staging (query output)
- Data_Clean (query output + validation flags)
- Dashboard (pivots/charts)
- Refresh_Status (counts + health checks)
- Canonical Schema:
- <Column>: <Type> | Required? | Validation
- Power Query:
- Query 1: Ingest_<name> (Folder/File)
- Query 2: Clean_<name>
- Key transforms: <bullets>
- Validation rules:
- <rule> -> <action>
- Pivot design:
- Rows/Columns/Values
- Slicers
If asked for artifacts, also output:
assets/power-query-folder-ingest-template.pq(adapted)assets/refresh-checklist.md
SAFETY & EDGE CASES
- Read-only by default: provide a plan + snippets unless the user explicitly requests file generation.
- Never delete or overwrite user files; propose new filenames for outputs.
- Prefer “no silent failure”: include row-count checks and visible error flags.
- For PDF/DOCX sources, require user-provided exported tables (CSV/XLSX) or clearly mark extraction risk.
EXAMPLES
-
Input: “Folder of weekly CSVs with PayNumber/Name/Date.”
Output: Folder-ingest PQ template + schema + Refresh Status checks + pivot dashboard plan.
-
Input: “Refresh breaks when new columns appear.”
Output: Defensive missing-column logic + column normalization + typed schema plan.
-
Input: “Folder of weekly CSVs with PayNumber/Name/Date.”
Output: Folder-ingest PQ template + schema + Refresh Status checks + pivot dashboard plan. -
Input: “Refresh breaks when new columns appear.”
Output: Defensive missing-column logic + column normalization + typed schema plan.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。