Skip to content
Advertisement

Tag: python-docx

Specify border appearance in tables using python-docx

I am going through the tutorial and documentation of python-docx. However, I can’t find any reference to how I can specify and manipulate the border appearance of a table created in a Microsoft Word document. When i use the following code: The resulting docx file shows the 3×3 table with header. Currently there is no black border (inner or outer)

add content to existing docx with python-docx

I’d like to open an existing word document where I already added page numbers and just add some text and headline to it. Here’s a basic example of how I tried to accomplish my goal When I do the above mentioned with a complete fresh document everything works fine – when doing this with the already existing file it fails

Advertisement