擅长:python、mysql、java
<p><a href="https://github.com/evfredericksen/oodocx" rel="nofollow">oodocx</a>是pythondocx模块的分支,它与python3.3完全兼容。方法可以用正则表达式代替。你的代码看起来像:</p>
<pre><code>from oodocx import oodocx
d = oodocx.Docx('myfile.docx')
d.replace('searchstring', 'replacestring')
d.save('mynewfile.docx')
</code></pre>
<p>如果只想删除字符串,可以将空字符串传递给“replace”参数。在</p>