这里的替换文本保留原格式是指,替换word中有规律的字符串,比如将6-7…6-28全部加一,替换成6-8…6-29
#coding: utf-8
import os, sys
# 安装docx: pip install python_docx
from docx import Document
from docx.shared import Inches
file_name = os.path.join(sys.path[0], "bylw.docx"
这里的替换文本保留原格式是指,替换word中有规律的字符串,比如将6-7…6-28全部加一,替换成6-8…6-29
#coding: utf-8
import os, sys
# 安装docx: pip install python_docx
from docx import Document
from docx.shared import Inches
file_name = os.path.join(sys.path[0], "bylw.docx"