excel-data-import
Import, merge, and transform data from Excel (.xlsx/.csv) files using YAML-driven configuration. Use when the user asks to: (1) import data from Excel/CSV into a template, (2) batch-process multiple files in a directory, (3) merge/consolidate data from multiple sources, (4) map and transform columns with validation rules, (5) do incremental data updates on existing spreadsheets. 当用户要求导入Excel、CSV导入、表格数据导入、Excel数据合并、批量处理Excel、字段映射、数据校验、 表头自动检测、增量更新Excel、多sheet合并时使用此技能。 Supports Chinese field names, multi-layer merged cell headers, auto header detection, CSV (auto-encoding), custom validators, and multi-source imports.
Best use case
excel-data-import is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Import, merge, and transform data from Excel (.xlsx/.csv) files using YAML-driven configuration. Use when the user asks to: (1) import data from Excel/CSV into a template, (2) batch-process multiple files in a directory, (3) merge/consolidate data from multiple sources, (4) map and transform columns with validation rules, (5) do incremental data updates on existing spreadsheets. 当用户要求导入Excel、CSV导入、表格数据导入、Excel数据合并、批量处理Excel、字段映射、数据校验、 表头自动检测、增量更新Excel、多sheet合并时使用此技能。 Supports Chinese field names, multi-layer merged cell headers, auto header detection, CSV (auto-encoding), custom validators, and multi-source imports.
Teams using excel-data-import 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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/excel-data-import/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How excel-data-import Compares
| Feature / Agent | excel-data-import | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Import, merge, and transform data from Excel (.xlsx/.csv) files using YAML-driven configuration. Use when the user asks to: (1) import data from Excel/CSV into a template, (2) batch-process multiple files in a directory, (3) merge/consolidate data from multiple sources, (4) map and transform columns with validation rules, (5) do incremental data updates on existing spreadsheets. 当用户要求导入Excel、CSV导入、表格数据导入、Excel数据合并、批量处理Excel、字段映射、数据校验、 表头自动检测、增量更新Excel、多sheet合并时使用此技能。 Supports Chinese field names, multi-layer merged cell headers, auto header detection, CSV (auto-encoding), custom validators, and multi-source imports.
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.
Related Guides
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
AI Agent for Product Research
Browse AI agent skills for product research, competitive analysis, customer discovery, and structured product decision support.
SKILL.md Source
# Excel Data Import
Configuration-driven data import from Excel and CSV files with field mapping, validation, and batch processing.
## Prerequisites
- Python 3.8+
- **Required**: `pip3 install openpyxl pyyaml`
- **Optional**: `pip3 install python-calamine` (for .xls legacy format)
## Quick Start
```yaml
# import_config.yaml
task_name: "人员信息导入"
source:
file_path: "data/source.xlsx"
sheet_name: "Sheet1"
header_row: 1
key_field: "身份证号"
target:
file_path: "output/result.xlsx"
sheet_name: "人员信息"
header_row: 2
data_start_row: 3
field_mappings:
- source: "姓名"
target: "员工姓名"
required: true
- source: "身份证号"
target: "身份证号码"
required: true
validate: "id_card"
- source: "部门"
target: "所属部门"
default: "待分配"
error_handling:
backup: true
```
```bash
python3 scripts/excel_import.py import_config.yaml
python3 scripts/excel_import.py import_config.yaml --dry-run # preview only
```
## Import Modes
| Mode | Source Config | Use Case |
|------|--------------|----------|
| Single file | `source.file_path` | One-to-one import |
| Directory batch | `source.type: "directory"` | Process all files in a folder |
| Multi-source | `sources: [...]` | Merge from multiple files |
| CSV | `.csv` file_path | Auto-encoding detection (UTF-8/GBK/GB2312) |
| Legacy .xls | `.xls` file_path | Requires `python-calamine` |
| Auto header | `header_row: "auto"` | Detect header in complex sheets |
For full parameter docs, see [data-mapping-guide.md](references/data-mapping-guide.md).
## Key Features
- **Incremental update**: Match by `key_field`, update existing or append new rows
- **Multi-layer merged headers**: Auto-detect and expand merged cell values
- **Validation rollback**: Failed rows are skipped entirely (no partial writes)
- **Source deduplication**: Duplicate keys across files are merged
- **Auto-create target**: Template generated from field_mappings if missing
## Built-in Transforms & Validators
**Transforms**: `strip`, `upper`, `lower`, `title`, `int`, `float`, `date`
**Validators**: `required`, `not_empty`, `id_card`, `phone`, `email`, `numeric`, `range`, `regex`, `length`
For advanced usage, see [advanced-features.md](references/advanced-features.md).
## CLI Options
| Option | Description |
|--------|-------------|
| `--dry-run` | Preview mode, no file writes |
| `--verbose` | Detailed per-record output |
| `--no-backup` | Skip target file backup |
## Reference Documents
- **Data Mapping Guide**: [data-mapping-guide.md](references/data-mapping-guide.md) — field mapping, transforms, validators
- **Advanced Features**: [advanced-features.md](references/advanced-features.md) — multi-source, batch, auto-header
- **Auto Header Detection**: [auto_header_detection.md](references/auto_header_detection.md) — complex header detection
- **Quickstart**: [quickstart.md](references/quickstart.md) — step-by-step tutorial
- **Workflow**: [workflow.md](references/workflow.md) — detailed execution flow
- **Best Practices**: [best_practices.md](references/best_practices.md) — usage recommendations
- **Error Handling**: [error-handling.md](references/error-handling.md) — error codes and recovery
- **Troubleshooting**: [troubleshooting.md](references/troubleshooting.md) — common issues
## Workflow
1. Read user's import requirements and source/target file info
2. Create or adjust YAML config file
3. Run `python3 scripts/excel_import.py <config.yaml>` with `--dry-run` first
4. Review output, fix issues, then run without `--dry-run`
5. Check the JSON report alongside the output fileRelated Skills
Database Engineering Mastery
> Complete database design, optimization, migration, and operations system. From schema design to production monitoring — covers PostgreSQL, MySQL, SQLite, and general SQL patterns.
Data Room Builder
Build a structured virtual data room checklist and folder hierarchy for fundraising, M&A, or due diligence.
Data Privacy & Protection Program
You are a **Data Privacy Officer (DPO) agent** — a comprehensive privacy program architect. You help organizations build, operate, and mature privacy programs that comply with global regulations (GDPR, CCPA/CPRA, LGPD, PIPEDA, POPIA, APPI, PDPA) while enabling business growth.
Data Migration Planner
Plan, execute, and validate data migrations between systems. Covers schema mapping, ETL pipeline design, rollback strategies, and post-migration validation.
Data Governance Framework
Assess, score, and remediate your organization's data governance posture across 6 domains.
Data Analyst — AfrexAI ⚡📊
**Transform raw data into decisions. Not just charts — answers.**
data-analysis-partner
智能数据分析 Skill,输入 CSV/Excel 文件和分析需求,输出带交互式 ECharts 图表的 HTML 自包含分析报告
Made-in-China Trade Data Analyst
**Short Description**
ercdata
Store, verify, and manage AI data on the Ethereum blockchain (Base network) using the ERCData standard. Use when an agent needs to store data fingerprints on-chain, verify data integrity, create audit trails, manage access control for private data, or interact with the ERCData smart contract. Supports public and private storage, EIP-712 verification, snapshots, and batch operations.
Data Engineering Command Center
Complete methodology for designing, building, operating, and scaling data pipelines and infrastructure. Zero dependencies — pure agent skill.
excel-finance
Excel 财务模型技能 - Excel 财务模型模板、自动化报表生成
ths-financial-data
该skill用于获取股票市场数据,包括实时行情、中文名称查询、键盘缩写转换、资金流向和日K线数据。使用thsdk库提供同花顺数据接口支持。支持自动将中文、缩写、短代码转换为thsdk所需的完整ths_code格式。当匹配到多只股票时,会返回候选列表供用户选择。如未安装thsdk,会自动安装。