excel-parsing

用于Excel表解析的Excel解析原子 skill,适用于通用行业文档解析场景。

105 stars

Best use case

excel-parsing is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

用于Excel表解析的Excel解析原子 skill,适用于通用行业文档解析场景。

Teams using excel-parsing should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/excel-parsing/SKILL.md --create-dirs "https://raw.githubusercontent.com/aifinlab/FinClaw/main/skills/archive/excel-parsing/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/excel-parsing/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How excel-parsing Compares

Feature / Agentexcel-parsingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

用于Excel表解析的Excel解析原子 skill,适用于通用行业文档解析场景。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Excel解析 Skill

## 数据来源

本 Skill 支持多种Excel文档输入格式,核心数据来源包括:

### 1. Excel文档类型
- **.xls格式**:Microsoft Excel 97-2003文档
- **.xlsx格式**:Microsoft Excel 2007及以上版本文档
- **.xlsm格式**:包含宏的Excel文档
- **.csv格式**:CSV格式数据文件

### 2. 文档内容类型
- **财务报表**:利润表、资产负债表、现金流量表
- **数据报表**:业务数据报表、统计报表
- **清单表格**:产品清单、客户清单、交易清单
- **分析表格**:数据分析表格、对比分析表格

### 3. 文档特征
- **工作表数量**:单工作表、多工作表
- **数据规模**:小表格(<1000行)、大表格(>10000行)
- **格式复杂度**:简单表格、复杂格式表格

### 4. 数据格式要求
- **文件路径**:本地文件路径或网络文件URL
- **文件编码**:UTF-8、GBK、GB2312等
- **文件权限**:需要读取权限

> 说明:本 Skill 不包含文档采集功能,需要用户提供Excel文档文件。建议文档格式规范,以便进行准确的解析。

---

## 功能

本 Skill 提供全面的Excel文档解析能力,涵盖多种解析功能:

### 1. 工作表识别
- **工作表列表**:识别所有工作表名称
- **工作表类型**:识别工作表类型和用途
- **工作表结构**:识别工作表的整体结构
- **工作表选择**:支持指定工作表解析

### 2. 表格数据提取
- **单元格数据提取**:提取单元格的具体数据
- **行列数据提取**:提取指定行列的数据
- **区域数据提取**:提取指定区域的数据
- **数据格式识别**:识别数据的格式类型

### 3. 表格结构识别
- **表头识别**:识别表格的表头行
- **数据区域识别**:识别数据区域范围
- **合并单元格处理**:处理合并单元格的情况
- **空行空列处理**:识别和处理空行空列

### 4. 格式信息提取
- **单元格格式**:提取单元格的格式信息
- **字体信息**:提取字体、字号、颜色等信息
- **对齐方式**:提取对齐方式信息
- **边框样式**:提取边框样式信息

### 5. 公式处理
- **公式识别**:识别单元格中的公式
- **公式计算**:计算公式的结果值
- **公式依赖**:识别公式的依赖关系

### 6. 图表识别
- **图表提取**:提取Excel中的图表
- **图表类型识别**:识别图表类型
- **图表数据提取**:提取图表的数据源

### 7. 高级处理功能
- **数据类型转换**:自动转换数据类型
- **数据清洗**:清洗和规范化数据
- **结构化输出**:输出结构化的表格数据

---

## 使用示例

### 输出示例
```json
{
  "document_info": {
    "filename": "financial_report.xlsx",
    "file_size": 2048000,
    "sheet_count": 3,
    "language": "zh-CN"
  },
  "sheets": [
    {
      "sheet_name": "利润表",
      "sheet_index": 0,
      "row_count": 50,
      "column_count": 5,
      "data_range": "A1:E50",
      "headers": ["项目", "2024年", "2023年", "2022年", "2021年"],
      "data": [
        {
          "row": 2,
          "values": ["营业收入", "1000", "900", "800", "700"]
        },
        {
          "row": 3,
          "values": ["营业成本", "600", "550", "500", "450"]
        }
      ],
      "merged_cells": [
        {
          "range": "A1:E1",
          "value": "利润表"
        }
      ]
    }
  ],
  "format_info": {
    "number_formats": {
      "B2:E50": "0.00"
    },
    "font_info": {
      "A1:E1": {
        "font": "宋体",
        "size": 14,
        "bold": true
      }
    }
  }
}
```

---

## 注意事项与限制

### 1. 文档格式要求
- 支持标准Excel格式文档
- 复杂格式可能影响解析准确性
- 受保护工作表可能无法解析

### 2. 解析准确性
- 标准表格解析准确率较高
- 复杂格式表格可能有限
- 公式计算需要Excel引擎支持

### 3. 性能考虑
- 大表格处理可能需要较长时间
- 内存占用与表格大小成正比
- 建议对大表格进行分块处理

### 4. 格式兼容性
- 不同Excel版本格式可能不同
- 需要处理格式兼容性问题
- 特殊格式可能需要特殊处理

### 5. 使用限制
- 本 Skill 不包含Excel编辑功能
- 解析结果需要人工复核
- 受保护文档可能无法解析

---

## 参考资料
- 见 references/ 目录中的相关文档,包括:
  - Excel解析方法手册
  - 表格结构识别算法说明
  - 公式处理使用指南
  - 性能优化指南

## License
- 本 skill 代码部分采用 MIT License,详见 `LICENSE` 文件
- 依赖与运行环境以 `requirements.txt` 为准
- 文档内容采用 CC BY 4.0 许可