xlsx

GitHub

处理Excel文件(.xlsx/.xls/.csv)的技能,涵盖读取数据、写入公式、单元格操作、格式化、筛选、创建图表及透视表等自动化任务。

resources/skill_evolve/spreadsheetbench_init_skill/xlsx/SKILL.md mindscale-noah/MindMemOS

触发场景

用户需要读取或修改Excel文件内容 用户希望进行电子表格自动化处理

安装

npx skills add mindscale-noah/MindMemOS --skill xlsx -g -y
更多选项

非标准路径

npx skills add https://github.com/mindscale-noah/MindMemOS/tree/main/resources/skill_evolve/spreadsheetbench_init_skill/xlsx -g -y

不安装直接使用

npx skills use mindscale-noah/MindMemOS@xlsx

指定 Agent (Claude Code)

npx skills add mindscale-noah/MindMemOS --skill xlsx -a claude-code -g -y

安装 repo 全部 skill

npx skills add mindscale-noah/MindMemOS --all -g -y

预览 repo 内 skill

npx skills add mindscale-noah/MindMemOS --list

SKILL.md

Frontmatter
{
    "name": "xlsx",
    "description": "Use this skill whenever the user wants to do anything with Excel spreadsheet files (.xlsx, .xls, .csv). This includes reading data, writing formulas, manipulating cells, formatting, filtering, creating charts, pivot tables, and any spreadsheet automation tasks."
}

Excel Spreadsheet Processing

Use openpyxl to read and write .xlsx files.

Quick Start

from openpyxl import load_workbook

wb = load_workbook("input.xlsx")
ws = wb["Sheet1"]

value = ws["A1"].value
ws["B2"] = 42
ws["C2"] = "=SUM(A2:B2)"

wb.save("output.xlsx")

Use this for direct cell edits, formula updates, and simple workbook changes.

Reading Data with pandas

import pandas as pd

df = pd.read_excel('file.xlsx')                          # First sheet
all_sheets = pd.read_excel('file.xlsx', sheet_name=None) # All sheets as dict

Common Pitfalls

  • Cell indices are 1-based: ws.cell(row=1, column=1) is A1.
  • data_only=True destroys formulas on save: Use a separate workbook object for reading calculated values.
  • ws.max_row overcounts: May include formatted-but-empty rows. Scan the column to find the last non-empty cell when you need the true data range.

版本历史

  • 1364c08 当前 2026-08-04 18:45

同 Skill 集合

skills/mindmemos-cli/SKILL.md

元信息

文件数
0
版本
1364c08
Hash
bcb738e9
收录时间
2026-08-04 18:45

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-05 06:05
浙ICP备14020137号-1 $访客地图$