【发布时间】:2020-09-10 19:23:59
【问题描述】:
我有以下工作代码 usinf python-docx:
import docx
inp = input('inp: ')
def write_docx_header():
document = docx.Document('Test.docx')
section = document.sections[0]
header = section.header
paragraph = header.paragraphs[0]
paragraph.text = inp + "\t" + inp + "\t" + inp
paragraph.style = document.styles["Header"]
document.save('Test.docx')
write_docx_header()
现在我想要一个表头中包含三列而不是三个选项卡的表格,但我不知道从哪里开始以及如何做。
非常感谢
【问题讨论】: