V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
myscarh
V2EX  ›  Python

请问下 PPT 批量替换文本的 API 是什么?

  •  
  •   myscarh · 2021-07-01 22:35:53 +08:00 · 1390 次点击
    这是一个创建于 1001 天前的主题,其中的信息可能已经有所发展或是发生改变。
    最好直接调用 PPT 自带的替换功能。
    手里有几千个 PPT (.pptx 和.ppt 都有))文件里有个关键字要批量替换
    类似 Word 的 Selection.Find, 网上找的很多库( pptx 这种)没法替换组合图形和表格里的文本。
    目前我用的方法是遍历每个 Slide 的每个 Shape,在判断每个 Shape 是否是组合 Shape,是的话递归,然后在遍历每个表格的每个 Cell 。
    结果就是嵌套了 5 层循环,一个 27 个 Slide 的 PPT 需要 1 分钟才能处理完,请问老哥们有啥好方法吗?
    3 条回复    2021-07-03 15:29:28 +08:00
    RockShake
        1
    RockShake  
       2021-07-02 08:50:10 +08:00
    我记得 Listory 应该可以
    kimown
        2
    kimown  
       2021-07-02 09:56:06 +08:00 via Android
    现在是用的哪个 python 库
    solopython
        3
    solopython  
       2021-07-03 15:29:28 +08:00
    试试 autohotkey
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5290 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 07:16 · PVG 15:16 · LAX 00:16 · JFK 03:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.