python-docx - Lists showing up as normal paragraphs

后端 未结 2 2043
清酒与你
清酒与你 2021-01-14 22:33

I am trying to insert numeric and bulleted lists into an existing Word document, however they are showing up as normal paragraphs:

# Open up existing documen         


        
2条回答
  •  失恋的感觉
    2021-01-14 23:15

    Bulleted and Numbered lists in Word are more complicated than other styles. They need to be linked to a numbering format, which is quite complex in itself, and not yet supported at the API level in python-docx.

    If you can use a "template" document as a starting point that has the list styles you need already defined, that will work, but of course that's not suitable for every use case.

提交回复
热议问题