Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计提醒

xlsx-generatorXLSX 生成器

Agent Skill

xlsx-generator 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

6,301

周安装

282

GitHub Stars

69

下载量

2,346
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:xlsx-generator(XLSX 生成器)
来源仓库:https://github.com/jwynia/agent-skills
仓库路径:skills/xlsx-generator
安装命令:
npx skills add https://github.com/jwynia/agent-skills --skill xlsx-generator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/jwynia/agent-skills --skill xlsx-generator

简介

xlsx-generator 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。
  • 通过 npx skills add 命令从指定仓库安装并使用。
  • 安装前需确认权限范围和维护状态,注意可能触发联网或命令执行。
  • 建议结合原始 README 核验具体用法和功能细节。

SKILL.md

XLSX Generator

When to Use This Skill

Use this skill when:

  • Creating Excel spreadsheets programmatically from data or specifications
  • Populating branded templates with dynamic content while preserving formatting
  • Extracting cell data, formulas, and structure from existing XLSX files
  • Finding and replacing placeholder text like {{TITLE}} or ${date} in cells
  • Automating spreadsheet generation workflows (reports, data exports, financial statements)

Do NOT use this skill when:

  • User wants to open/view spreadsheets (use native Excel or viewer)
  • Complex pivot tables or charts are required (limited support)
  • Working with older.xls format (XLSX only)
  • Real-time collaborative editing is needed

Prerequisites

  • Deno installed (https://deno.land/)
  • Input XLSX files for template-based operations
  • JSON specification for scratch generation

Quick Start

Two Modes of Operation

  1. Template Mode: Modify existing branded templates

- Analyze template to find placeholders and structure - Replace {{PLACEHOLDERS}} with actual values

  1. Scratch Mode: Create spreadsheets from nothing using JSON specifications

Instructions

Mode 1: Template-Based Generation

Step 1a: Analyze the Template

Extract cell inventory to understand what can be replaced:

deno run --allow-read scripts/analyze-template.ts financial-template.xlsx > inventory.json

Output (inventory.json):

{
  "filename": "financial-template.xlsx",
  "sheetCount": 3,
  "sheets": [
    {
      "name": "Summary",
      "rowCount": 25,
      "colCount": 8,
      "usedRange": "A1:H25",
      "cells": [
        { "address": "A1", "row": 1, "col": 1, "value": "{{REPORT_TITLE}}", "type": "string" },
        { "address": "B3", "row": 3, "col": 2, "value": "{{DATE}}", "type": "string" },
        { "address": "C5", "row": 5, "col": 3, "value": null, "type": "number", "formula": "SUM(C6:C20)" }
      ]
    }
  ],
  "placeholders": [
    { "tag": "{{REPORT_TITLE}}", "location": "Summary!A1", "sheet": "Summary", "address": "A1" },
    { "tag": "{{DATE}}", "location": "Summary!B3", "sheet": "Summary", "address": "B3" }
  ],
  "hasFormulas": true
}

Step 1b: Create Replacement Specification

Create replacements.json:

{
  "textReplacements": [
    { "tag": "{{REPORT_TITLE}}", "value": "Q4 2024 Financial Report" },
    { "tag": "{{DATE}}", "value": "December 15, 2024" },
    { "tag": "{{COMPANY}}", "value": "Acme Corporation", "sheets": ["Summary", "Cover"] }
  ],
  "cellUpdates": [
    { "sheet": "Data", "address": "B5", "value": 1250000 },
    { "sheet": "Data", "address": "B6", "value": 750000 }
  ]
}

Step 1c: Generate Output

deno run --allow-read --allow-write scripts/generate-from-template.ts \
  financial-template.xlsx replacements.json output.xlsx

Mode 2: From-Scratch Generation

Step 2a: Create Specification

Create spec.json:

{
  "title": "Sales Report",
  "author": "Finance Team",
  "sheets": [
    {
      "name": "Sales Data",
      "data": [
        ["Product", "Q1", "Q2", "Q3", "Q4", "Total"],
        ["Widget A", 10000, 12000, 15000, 18000, null],
        ["Widget B", 8000, 9000, 11000, 13000, null],
        ["Widget C", 5000, 6000, 7000, 8000, null]
      ],
      "cells": [
        { "address": "F2", "formula": "SUM(B2:E2)" },
        { "address": "F3", "formula": "SUM(B3:E3)" },
        { "address": "F4", "formula": "SUM(B4:E4)" }
      ],
      "columns": [
        { "col": "A", "width": 15 },
        { "col": "B", "width": 10 },
        { "col": "C", "width": 10 },
        { "col": "D", "width": 10 },
        { "col": "E", "width": 10 },
        { "col": "F", "width": 12 }
      ],
      "freezePane": "A2",
      "autoFilter": "A1:F4"
    }
  ]
}

Step 2b: Generate Spreadsheet

deno run --allow-read --allow-write scripts/generate-scratch.ts spec.json output.xlsx

Examples

Example 1: Monthly Sales Report

Scenario: Generate a monthly sales report from template.

Steps:

# 1. Analyze template for replaceable content
deno run --allow-read scripts/analyze-template.ts sales-template.xlsx --pretty

# 2. Create replacements.json with monthly data
# 3. Generate report
deno run --allow-read --allow-write scripts/generate-from-template.ts \
  sales-template.xlsx replacements.json November-Sales.xlsx

Example 2: Data Export with Formulas

Scenario: Create a spreadsheet with calculated totals.

spec.json:

{
  "sheets": [{
    "name": "Expenses",
    "data": [
      ["Category", "January", "February", "March", "Total"],
      ["Office", 1500, 1600, 1400, null],
      ["Travel", 3000, 2500, 4000, null],
      ["Software", 500, 500, 500, null],
      ["Total", null, null, null, null]
    ],
    "cells": [
      { "address": "E2", "formula": "SUM(B2:D2)" },
      { "address": "E3", "formula": "SUM(B3:D3)" },
      { "address": "E4", "formula": "SUM(B4:D4)" },
      { "address": "B5", "formula": "SUM(B2:B4)" },
      { "address": "C5", "formula": "SUM(C2:C4)" },
      { "address": "D5", "formula": "SUM(D2:D4)" },
      { "address": "E5", "formula": "SUM(E2:E4)" }
    ]
  }]
}

Example 3: Multi-Sheet Workbook

Scenario: Create a workbook with summary and detail sheets.

spec.json:

{
  "title": "Q4 Report",
  "sheets": [
    {
      "name": "Summary",
      "data": [
        ["Department", "Budget", "Actual", "Variance"],
        ["Sales", 500000, 520000, null],
        ["Marketing", 200000, 195000, null]
      ],
      "cells": [
        { "address": "D2", "formula": "C2-B2" },
        { "address": "D3", "formula": "C3-B3" }
      ]
    },
    {
      "name": "Sales Detail",
      "data": [
        ["Month", "Revenue", "Cost", "Profit"],
        ["October", 180000, 120000, null],
        ["November", 170000, 115000, null],
        ["December", 170000, 110000, null]
      ],
      "cells": [
        { "address": "D2", "formula": "B2-C2" },
        { "address": "D3", "formula": "B3-C3" },
        { "address": "D4", "formula": "B4-C4" }
      ]
    }
  ]
}

Script Reference

ScriptPurposePermissions
analyze-template.tsExtract cells, formulas, placeholders from XLSX--allow-read
generate-from-template.tsReplace placeholders in templates--allow-read --allow-write
generate-scratch.tsCreate XLSX from JSON specification--allow-read --allow-write

Specification Reference

Sheet Options

PropertyTypeDescription
namestringSheet name
dataarray2D array of cell values starting at A1
cellsarrayIndividual cell specifications
rowsarrayRow-based data specifications
columnsarrayColumn width and visibility settings
mergesarrayMerged cell ranges
freezePanestringFreeze panes at this cell (e.g., "A2")
autoFilterstringAuto-filter range (e.g., "A1:F10")

Cell Options

PropertyTypeDescription
addressstringCell address (e.g., "A1", "B2")
valuemixedCell value (string, number, boolean, null)
formulastringFormula without = sign
formatstringNumber format (e.g., "#,##0.00")
typestringForce type: "string", "number", "boolean", "date"

Column Options

PropertyTypeDescription
colstringColumn letter (e.g., "A", "B", "AA")
widthnumberColumn width in characters
hiddenbooleanHide column

Template Replacement Options

PropertyTypeDescription
tagstringPlaceholder to find (e.g., "{{TITLE}}")
valuemixedReplacement value
sheetsarrayLimit to specific sheets
rangestringLimit to cell range (e.g., "A1:D10")

Common Issues and Solutions

Issue: Placeholders not being replaced

Symptoms: Output XLSX still contains {{PLACEHOLDER}} tags.

Solution:

  1. Run analyze-template.ts to verify exact tag text and location
  2. Check that placeholder is in a string cell, not a formula
  3. Verify sheet filter in replacement spec

Issue: Formulas showing as text

Symptoms: Formulas display as text instead of calculating.

Solution:

  • Ensure formula doesn't start with "=" in spec (it's added automatically)
  • Check cell type is not forced to "string"

Issue: Numbers formatted as text

Symptoms: Numbers have green triangle indicating text storage.

Solution:

  • Use numeric values in spec, not quoted strings
  • For template replacement, if entire cell is placeholder and replacement is number, it converts automatically

Issue: Column widths not applied

Symptoms: Columns have default width despite specification.

Solution:

  • Ensure column letters are uppercase
  • Verify column spec is in array format

Limitations

  • XLSX only: Does not support legacy.xls or.xlsb formats
  • No macros: Cannot create or preserve VBA macros
  • Limited charting: No native chart creation support
  • No pivot tables: Cannot create pivot tables programmatically
  • Basic styling: Limited cell formatting options
  • No conditional formatting: Cannot set conditional format rules
  • Formula recalc: Formulas are stored but not recalculated (Excel recalculates on open)

Related Skills

  • pptx-generator: For creating PowerPoint presentations
  • docx-generator: For creating Word documents
  • csv-processor: For simpler CSV data processing

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.28%
按下载量换算663

OpenCode

23.43%
按下载量换算550

Antigravity

19.13%
按下载量换算449

Codex

13.1%
按下载量换算307

Gemini CLI

6.9%
按下载量换算162

Cursor

3.66%
按下载量换算86

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills