RT python 白板,想用python处理word文件的页眉页脚,python-docx 支持吗?
for section in doc_obj.sections:
header = section.header
footer = section.footer
if header is not None:
print (header.text)
if footer is not None:
print(footer.text)
AttributeError: 'Section' object has no attribute 'header'