标签:graphs 内容 doc int from document 读取 docx graph
from docx import Document
word=Document(‘,,,,,,.docx‘)
paragraphs=word.paragraphs #返回一个列表,有多少段就有多少个值
for i in paragraphs:
print(i.text) #打印每段内容
a=paragraphs[0]
for j in a.runs: #打印这一段所有的文字块
print(j.text)
标签:graphs 内容 doc int from document 读取 docx graph
原文地址:https://www.cnblogs.com/energetic/p/13052451.html