How to setup cell borders with python-docx

Valentin picture Valentin · Oct 11, 2015 · Viewed 16.6k times · Source

I need to setup cells borders in table with python-docx, but can't find how to. Please help.

Answer

Iulian Stana picture Iulian Stana · Jul 1, 2016

Take a look at the issue posted on git.

You can use some default table style:

table = document.add_table(rows, cols)
table.style = 'TableGrid'