Skip to content Skip to sidebar Skip to footer

Python-docx How To Apply Different Styles To Different Cells In A Table

Working on a table in python-docx. I am trying to apply a different style to the first row of the table vs. the rest of the rows. This would be the Header row. Here's the table: ta

Solution 1:

A paragraph style can only be applied to a paragraph.

for paragraph in cell.paragraphs:
    paragraph.style = document.styles['Heading 1']

Post a Comment for "Python-docx How To Apply Different Styles To Different Cells In A Table"