Text-Replace in docx and save the changed file with python-docx

前端 未结 8 746
小鲜肉
小鲜肉 2021-01-02 07:04

I\'m trying to use the python-docx module to replace a word in a file and save the new file with the caveat that the new file must have exactly the same formatting as the ol

8条回答
  •  迷失自我
    2021-01-02 07:36

    I've forked a repo of python-docx here, which preserves all of the preexisting data in a docx file, including formatting. Hopefully this is what you're looking for.

提交回复
热议问题