skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
yejinlei/excel-parser-skill87 installs

excel-parser

支持多种Excel格式的内容提取和写入技能,使用calamine库处理.xls、.xlsx、.xlsm等格式。当用户需要解析Excel文件、提取表格数据、将Excel转换为文本格式、分析Excel内容、批量处理Excel文件、创建新Excel文件或更新现有Excel文件时,务必使用此技能。适用于数据提取、报表分析、内容审核、数据导出等场景。

How do I install this agent skill?

npx skills add https://github.com/yejinlei/excel-parser-skill --skill excel-parser
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubwarn

    The Excel Parser skill parses and writes spreadsheet data. It includes a mechanism in its core script to automatically install missing Python dependencies (python-calamine, xlrd, openpyxl) from PyPI using system commands at runtime. While these libraries are legitimate, performing automatic system-level changes like package installation via shell is a security concern. Additionally, because the skill processes external spreadsheet files provided by users, it presents a surface for indirect prompt injection if an attacker embeds malicious instructions in the cell data.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

  • Runlayerwarn

    2/15 files flagged

What does this agent skill do?

Excel Parser Skill

Excel Parser技能用于从Excel文件中提取内容和写入内容,支持多种Excel格式。

Compatibility

  • Python 3.7+
  • 依赖: python-dotenv, python-calamine
  • 备选依赖: xlwings (用于所有Excel格式)

使用方法

基本使用

from excel_parser import ExcelParser, process_excel, write_excel_file, update_excel_file

# 方法1: 使用ExcelParser类
parser = ExcelParser()

# 读取Excel文件
result = parser.parse_excel('path/to/file.xlsx')

# 获取文本格式输出
text = parser.parse_excel_to_text('path/to/file.xlsx')

# 写入Excel文件
write_data = {
    "sheets": [
        {
            "name": "Sheet1",
            "rows": [["A1", "B1"], ["A2", "B2"]],
            "merged_cells": [
                {
                    "start_row": 0,
                    "end_row": 0,
                    "start_col": 0,
                    "end_col": 1
                }
            ]
        }
    ]
}
parser.write_excel('output.xlsx', write_data)

# 更新Excel文件
parser.update_excel('existing_file.xlsx', write_data)

# 方法2: 使用便捷函数
# 读取Excel文件
result = process_excel('path/to/file.xlsx')

# 写入Excel文件
write_result = write_excel_file('output.xlsx', write_data)

# 更新Excel文件
update_result = update_excel_file('existing_file.xlsx', write_data)

返回结果格式

{
    "text": "格式化的文本内容",
    "sheets": [
        {
            "name": "Sheet1",
            "rows": [["A1", "B1"], ["A2", "B2"]],
            "row_count": 2,
            "column_count": 2
        }
    ],
    "sheet_count": 1,
    "total_cells": 4,
    "engine": "python-calamine"
}

支持的文件格式

  • .xls (Excel 97-2003)
  • .xlsx, .xlsm (Excel 2007+)
  • .xltx, .xltm (Excel模板)

环境变量配置

创建 .env 文件:

# 最大行数限制,默认100行
EXCEL_MAX_ROWS=100

# 是否保留空行,默认false
EXCEL_KEEP_EMPTY_ROWS=false

详细文档

更多使用示例和故障排除信息,参见 README.md。

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/yejinlei/excel-parser-skill/excel-parser">View excel-parser on skillZs</a>