from docx import Document
import pandas as pd
import copy
def replace(document, replace_str_dict):
print("------在word模板文件中替换合同要素信息")
for paragraph in document.paragraphs:
for run in paragraph.runs:
for key,value in replace_str_dict.items():
run.text = run.text.replace(key, value)
for table in document.tables:
for row in table.
用excel替换word里的文字,deepcopy
最新推荐文章于 2024-03-06 21:17:45 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)