👉 项目官网:https://www.python-office.com/ 👈

👉 本开源项目的交流群 👈

atomgit star github star gitee star PyPI Downloads AI交流群

之前的课程里讲了一个功能:Excel无损转PDF,只需要1行Python代码,粉丝有福了

付费读者提了一个需求:指定sheet,今天我开发好了。

代码如下:

1
2
3
4
# pip install poexcel

poexcel.excel2pdf(excel_path=r'./excel_files/fake2excel.xlsx', pdf_path=r'./output_path',sheet_id=0)

指定sheet,只需要修改最后一个参数:sheet_id,后面的整数对应sheet的顺序,请注意0对应的是第一个sheet

读者群

相关阅读

🎓 AI 编程实战课程

程序员晚枫专注AI编程培训,通过 《30讲 · AI编程训练营》,让小白也能用AI做出实际项目。帮你从零上手!