xlsx
XLSX — Scene-Driven Spreadsheet Workbench
Environment Setup
Quick check — run this first. If it exits 0, skip to Pre-Flight:
source "<skill_directory>/env_setup/env_check.sh"This auto-detects and exports XLSX_SKILL_DIR and FONT_DIR. No manual variable setup needed.
Only if the check fails, read env_setup/setup.md for full platform-specific installation instructions (dependencies, fonts, China mirrors).
🔴 LibreOffice is install-on-demand and NOT substitutable. env_check.sh reports it as on-demand MISSING without failing, so a passing check does not mean it is present. The moment a task needsrecalc,.xlsx→PDF, or.csv→.xlsx, you MUST install it — using the user's
Excel/WPS/Numbers instead is forbidden, and a large download is not a reason to skip.
See HARD REQUIREMENT under Quality Gate.
| Variable | Auto-set by env_check.sh | Description |
|----------|--------------------------|-------------|
| XLSX_SKILL_DIR | skill root directory | Parent of this file |
| FONT_DIR | macOS: ~/Library/Fonts, Linux: /usr/share/fonts | Font base directory |
Local-font-first. Inspect fonts available in the user's local environment and prefer a suitable
installed font. Use bundled or downloaded fonts only as fallbacks; do not install fonts without the
user's confirmation.
Pre-Flight: Intent Gate
Before touching any code, confirm the user actually needs a spreadsheet:
- Report / analysis summary (述职, 调研报告) → docx skill
- Presentation (汇报, 演示, pitch deck) → pptx skill
- Formal print document (合同, 证书, "PDF") → pdf skill
- Charts only, no data table needed → charts skill
- User explicitly says a format → respect it
If confirmed xlsx → proceed to Scene Router below.
Request Decomposition (do this every time):
- Explicit needs: sheets, columns, formulas, metrics the user stated
- Implicit needs: business context, downstream use (filter? sort? input?)
- Multi-part requests: generate ALL parts — never silently drop a component
Multi-Intent Detection — some requests combine multiple scenes:
"Create a financial model with charts and export a PDF summary"
→ scenes/finance.md + engines/chart.md + (hand off PDF to pdf skill)
"Analyze this CSV, build a dashboard, and make it look professional"
→ scenes/analyze.md + engines/chart.md + engines/design.md
"Edit this budget file, add a new quarter column, and create a pivot"
→ scenes/edit.md + quality/pipeline.md (pivot command)
"Convert these 5 CSVs into one xlsx with a summary sheet"
→ scenes/convert.md + scenes/create.md (for summary)When multiple intents detected, load all matching files and execute in logical order: data preparation → analysis → visualization → styling → QA.
File Loading Rules (MANDATORY)
Always load ALL matched files. No shortcuts, no lazy loading, no "on demand".
User Request
│
├─ 1. Read SKILL.md (this file) — always
├─ 2. Route to scene file(s) via Scene Router below — read COMPLETELY
├─ 3. If scene involves charts → ALSO read engines/chart.md
├─ 4. If scene produces styled output → ALSO read engines/design.md
├─ 5. If scene is analyze → ALSO read scenes/analyze-recipes.md
├─ 6. If scene is edit → ALSO read scenes/edit-patterns.md
├─ 7. If scene is VBA → ALSO read engines/vba-templates.md
└─ 8. QA: always run full pipeline (quality/pipeline.md)Rule: when in doubt, read the file. The cost of reading an extra file is a few hundred tokens. The cost of NOT reading it is a broken output that needs to be redone.
Chart + Design engines are loaded by default unless the task is purely read-only (inspect/validate with no output file). If you are creating or editing an xlsx, you MUST read engines/design.md.
Scene Router
User Request
│
├─ Involves an existing file?
│ ├─ Yes → Modify content or structure?
│ │ ├─ Yes ──────────────────── → scenes/edit.md
│ │ └─ No (read/analyze only) ─ → scenes/analyze.md
│ │
│ └─ Format conversion (CSV↔XLSX, JSON, PDF tables)?
│ └─ Yes ────────────────────────── → scenes/convert.md
│
├─ Create from scratch?
│ ├─ Financial / budget / forecast / cost tracking?
│ │ ├─ Complex (DCF / LBO / three-statement linkage (三表联动) / sensitivity / IB model)?
│ │ │ └─ Yes ─────────────────────── → scenes/finance.md
│ │ └─ Simple (budget table (预算表) / expense report (费用报表) / revenue vs cost (收支对比) / project cost (项目成本) / personal finance (个人记账))?
│ │ └─ Yes ─────────────────────── → scenes/finance_lite.md
│ └─ General table / report / template
│ └─ ──────────────────────────── → scenes/create.md
│
├─ Batch processing / large files / protection / validation?
│ └─ Yes ───────────────────────────── → scenes/advanced.md
│
├─ VBA / macros / automation inside Excel?
│ └─ Yes ───────────────────────────── → scenes/vba.md + engines/vba-templates.md
│
├─ Needs charts or data visualization?
│ └─ Yes ───────────── append ────────→ engines/chart.md
│
└