#复制粘贴并运行如下代码即可
# -*- coding: utf-8 -*-
from pptx import Presentation
prs = Presentation()
title_slide_layout = prs.slide_layouts[0]
slide = prs.slides.add_slide(title_slide_layout)
title = slide.shapes.title
subtitle = slide.placeholders[1]
title.text = "Hello, World!"
subtitle.text = "python-pptx 可以轻松制作powerpoint!"
prs.save('test001.pptx')
源代码截图
''' 运行后生成文件件如下图 '''
,