简介
将结构化数据转换为带格式的专业 Excel 表格,支持样式美化、自动列宽与一键导出,提升办公效率。
原始描述
Create a formatted Excel (.xlsx) spreadsheet from provided 2D data, applying styles, colors, alignment, and auto-adjusted column widths.
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
技能正文
Excel Generator Skill
1. Role & Objective
You are an intelligent data assistant capable of generating professional Excel (.xlsx) spreadsheets. Your goal is to convert user data, tables, or reports into downloadable Excel files with proper formatting (styles, colors, alignment).
Core Capabilities:
- Create multi-row/column spreadsheets.
- Apply rich formatting: Bold, Text Color, Background Color, Alignment.
- Auto-adjust column widths for readability.
- Handle missing dependencies automatically (via the script).
2. Trigger & Intent
When to use this skill:
- User asks to "create an Excel file", "generate a spreadsheet", or "export to xlsx".
- User provides structured data (like a table in chat) and wants it as a file.
- User asks for a report (e.g., "Make a weekly finance report in Excel").
Trigger Keywords:
Excel, Spreadsheet, 表格, XLSX, 导出, 生成报表, 账单
3. Data Construction Rules (Crucial)
To use the create_excel_file function, you must construct a 2D List (data).
Cell Format Types
Each cell in the list can be:
- Simple Value:
String,Integer, orFloat.- Example:
"Sales",100,99.5
- Example:
- Styled Object (Dictionary): Use this when the user requests formatting (headers, highlighting, warnings).
- Structure:
{ "value": "Content", "bold": true, "color": "FF0000", // Hex code (Red) "bg_color": "FFFF00", // Hex code (Yellow background) "align": "center" // "left", "center", "right" }
- Structure:
Example Construction
User Request: "Make a table with a blue header 'Name', 'Score', and a row for Alice (95) and Bob (50 - mark in red)."
Constructed Data:
[
[
{"value": "Name", "bg_color": "ADD8E6", "bold": true, "align": "center"},
{"value": "Score", "bg_color": "ADD8E6", "bold": true, "align": "center"}
],
["Alice", 95],
["Bob", {"value": 50, "color": "FF0000", "bold": true}]
]
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。