CtrlK
BlogDocsLog inGet started
Tessl Logo

split_excel_by_column

按指定列的内容拆分 Excel 文件,每个唯一值一个文件。当用户提到按列拆分 Excel、按字段拆分表格时使用。

SKILL.md
Quality
Evals
Security

split_excel_by_column Skill

按指定列的内容拆分 Excel 文件

功能描述

根据指定列的内容,将一个 Excel 文件拆分为多个 Excel 文件,每个唯一值对应一个新文件。

所属分类

office/skills/excel/split_excel_by_column/

调用方式

from office.skills.excel import split_excel_by_column

split_excel_by_column(
    filepath='./data.xlsx',
    column=0,
    worksheet_name=None
)

参数说明

参数类型必填默认值说明
filepathstr-需要拆分的 Excel 文件路径
columnint-按哪一列的内容进行拆分(列索引)
worksheet_namestrNone指定工作表名称。默认处理第一个工作表

返回值

None

使用示例

from office.skills.excel import split_excel_by_column
# 按第 0 列拆分
split_excel_by_column(filepath='./orders.xlsx', column=0)

原始函数

office.api.excel.split_excel_by_column

Repository
CoderWanFeng/python-office
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.