简体   繁体   中英

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.

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?

This is what I want as an output:桌子。

I want it to auto numbering the table heading to "3.1" below "3 Chapter Three".

Sorry for any grammatical mistakes. Thank you in advance.

styleParagraph = document.add_paragraph("Hello it me")
styleParagraph.style = 'Heading 1'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM