agentleFS
CoderWanFengCoderWanFeng/python-office/skills/excel/excel2csv/SKILL.md

excel2csv

Skill1.4k starsChanged 20 days agoApache-2.0View on GitHub

把 Excel 工作表导出为 CSV,默认 utf-8-sig 编码解决中文乱码,支持多工作表批量导出。当用户提到 Excel 转 CSV、表格转文本、CSV 乱码时使用。

The file

Files
SKILL.md

excel2csv Skill

把 Excel 导出成 CSV,中文不乱码

功能描述

把一个或多个工作表导出为 CSV。默认使用 utf-8-sig(带 BOM), 双击用 Excel 打开中文不会乱码;需要给 Linux 工具链消费时可以改成 utf-8。 多工作表时会按 <文件名>_<工作表名>.csv 分别导出。

所属分类

skills/excel/excel2csv/

调用方式

from skills.excel import excel2csv

excel2csv(excel_path='报表.xlsx', output_dir='./csv')

参数说明

参数类型必填默认值说明
excel_pathstr是-Excel 文件路径
output_dirstr否None输出目录,默认与 Excel 同目录
sheet_namestr否None只导出指定工作表,默认全部
encodingstr否'utf-8-sig'输出编码
delimiterstr否','分隔符,可用 ';' 或 '\t'

返回值

dict,包含 files(CSV 绝对路径列表)、rows(工作表名 -> 数据行数)、 encoding、delimiter。

使用示例

from skills.excel import excel2csv

result = excel2csv('报表.xlsx', output_dir='./csv')
for path in result['files']:
    print('已导出', path)
print('行数统计', result['rows'])

原始函数

contributors/my12yyds/excel2csv.py

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.