37,722
社区成员
发帖
与我相关
我的任务
分享
from copy import deepcopy
from docx import Document
filename = 'D:/file-sample_500kB.docx'
document = Document(filename)
table = document.tables[0] # For 1st table
new_table = deepcopy(table)
paragraph = document.add_paragraph()
paragraph._p.addnext(new_table._element)
document.save(filename)