python-docx-template icon indicating copy to clipboard operation
python-docx-template copied to clipboard

Banded rows when looping through a table

Open nixshal opened this issue 4 years ago • 1 comments

Hello

I wanted to confirm if there was a way to make sure the banded rows (rows in alternate colors) show up.

In my example.pdf, the table at the top has the banded rows option selected (under the Table Design tab).

However, when looping through the table, only the orange color row (or any other color that the variable is in) is preserved and you don't get the appearance of the banded row.

Would like some help on how I could achieve this. Thanks.

nixshal avatar Jan 11 '22 13:01 nixshal

Setting the table design to this and checking "banded rows": image

Results in a table in the template that looks like this: image

Which successfully gave me banded rows. However, it was a while ago I did this and I recall having to fiddle with the different options at first.

sebastian-jansson avatar Jan 31 '22 10:01 sebastian-jansson

Look this example: Dynamically set cellbg

SergeyZaykov avatar Nov 13 '22 22:11 SergeyZaykov