haige
haige
### 最后我自己写了处理方法,使用python-docx的库处理的,最后成功处理。 ```python def merge_cells(self, tables): """ 合并Word文档中的单元格 :param tables: 要合并的表格 """ index_zhi_biao = False for table in tables[23:]: rows = table.rows old = '' old_ = '' old_text =...
> > ```python > > from docxtpl import DocxTemplate > > > > # 初始化模板对象 > > tpl = DocxTemplate("./temp.docx") > > > > # 定义字典 context 填充渲染模板的数据 > >...
> > > > ```python > > > > from docxtpl import DocxTemplate > > > > > > > > # 初始化模板对象 > > > > tpl = DocxTemplate("./temp.docx")...