OpenParable
Skip to content
← Back to skills

Excel2pdf

Documents
excel2pdf

Excel2pdf is an Agent Skill for documents published in the CoderWanFeng/python-office repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

将 Excel 文件的指定工作表转换为 PDF 格式。当用户提到 Excel 转 PDF、表格转 PDF、导出 Excel 为 PDF 时使用。

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/CoderWanFeng/python-office/blob/HEAD/skills/excel/excel2pdf/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/excel2pdf, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

excel2pdf Skill

将 Excel 文件的指定工作表转换为 PDF 格式

功能描述

将 Excel 文件的指定工作表转换为 PDF 文件。

所属分类

office/skills/excel/excel2pdf/

调用方式

from office.skills.excel import excel2pdf

excel2pdf(
    excel_path='./data.xlsx',
    pdf_path='./data.pdf',
    sheet_id=0
)

参数说明

参数类型必填默认值说明
excel_pathstr是-Excel 文件的路径
pdf_pathstr是-转换后生成的 PDF 文件的路径
sheet_idint否0工作表的索引(默认第一个工作表)

返回值

None

使用示例

from office.skills.excel import excel2pdf
excel2pdf(excel_path='./report.xlsx', pdf_path='./report.pdf', sheet_id=0)

视频教程

https://www.bilibili.com/video/BV1A84y1N7or/

原始函数

office.api.excel.excel2pdf