from docx import *
# 创建一个已存在的 word 文档的对象
file = Document('测试.docx')
# 读取每个段落的内容并输出for it in file.paragraphs:
print(it.text)
# 读取表格中的内容并输出for it in file.tables:
for row in it.rows:
for cell in row.cells:
print(cell.text)
posted on
2020-04-07 21:11一往无前!
阅读(379)
评论(0)
编辑收藏举报