from docx import Document
doc = Document()
table = doc.add_table(6,6)
header_row = table.rows[0]
header_row.merge_cells(0,3)
doc.save('合并单元格.docx')
这样,会报错:
Traceback (most recent call last):
File "D:/myProgram/pythonProgram/JetbrainsCrack/excelToMssql/从excel导入到word/合并单元格.py", line 6, in <module>
header_row.merge_cells(0,3)
AttributeError: '_Row' object has no attribute 'merge_cells'
谁有好法子,合并word表格的单元格吗?这个错误,在baidu、google都搜索,都没有搜到相同错误的
--
FROM 120.242.253.*