[英]Is there any way to add a subheading to a table in python-docx?
Statement: I have tried to generate table from a JSON file and want it to auto numbering the subheading.声明:我试图从 JSON 文件生成表,并希望它自动编号副标题。
Is there any way to makes auto numbering works for a table under a paragraph heading?有没有办法让段落标题下的表格自动编号? Should I have to do something with
table.style
or not?我是否必须对
table.style
?
This is what I want as an output:这就是我想要的 output:
I want it to auto numbering the table heading to "3.1" below "3 Chapter Three".我希望它将表格标题自动编号为“3 第三章”下方的“3.1”。
Sorry for any grammatical mistakes.抱歉有任何语法错误。 Thank you in advance.
先感谢您。
styleParagraph = document.add_paragraph("Hello it me")
styleParagraph.style = 'Heading 1'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.