python之从PPT提取文字到word

from docx import Document
from pptx import Presentation
wordfile=Document()
filepath=r'test.pptx'
pptx=Presentation(filepath)
for slide in pptx.slides:
    for shape in slide.shapes:
        if shape.has_text_frame:
            text_frame=shape.text_frame
            for paragraph in text_frame.paragraphs:
                wordfile.add_paragraph(paragraph.text)
save_path=r'test.docx'
wordfile.save(save_path)

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-25 14:26:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-25 14:26:02       106 阅读
  3. 在Django里面运行非项目文件

    2023-12-25 14:26:02       87 阅读
  4. Python语言-面向对象

    2023-12-25 14:26:02       96 阅读

热门阅读

  1. 【AI】人工智能复兴的推进器之自然语言处理

    2023-12-25 14:26:02       61 阅读
  2. CentOS+ISCSI

    2023-12-25 14:26:02       57 阅读
  3. 学习Vue2.x

    2023-12-25 14:26:02       62 阅读
  4. 开发web应用,用前端技术还是.NET?

    2023-12-25 14:26:02       59 阅读
  5. 国产化之路 Linux Mono下的asp.net 开发笔记(一)

    2023-12-25 14:26:02       64 阅读
  6. void类型指针和函数指针

    2023-12-25 14:26:02       58 阅读
  7. 盘点 | 2023年针对国内的电子邮件安全事件

    2023-12-25 14:26:02       54 阅读
  8. obs video-io.c

    2023-12-25 14:26:02       47 阅读