我需要阅读Docx文档并检测列表类型。 段落样式中没有列表类型的信息。 我通过检测列表
if "<w:numId" in paragraph._p.xml:
pass#this is list
但我不知道如何获得列表的类型。可能在编号中有一些信息? 例如:
...
from docx.oxml import numbering
for paragraoh in document.paragraphs:
if "<w:numId" in paragraph._p.xml:
if numbering.style == "Numbering":
pass#this is numbering
else:
pass#this is bullet
为了阅读Docx,我使用python3的Docx库 如何获取列表的类型
目前没有回答
相关问题 更多 >
编程相关推荐