Open xrl12 opened 2 years ago
Well, what is wrong?
{% for xxx%} 和 {% endfor %} 分别改为 {%tr for xxx%} 和 {%tr endfor %}
{% for xxx%} 和 {% endfor %} 分别改为 {%tr for xxx%} 和 {%tr endfor %}
It didn't help. The row of merged columns does not extend to all the table width.
nested_horizontal_merge_tpl-1.docx generated_doc.docx
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Testing the nested_horizontal_merge_tpl.docx template."""
from docxtpl import DocxTemplate
doc = DocxTemplate("nested_horizontal_merge_tpl-1.docx")
doc.render({})
doc.save("generated_doc.docx")
Python 3.10.13 docxtpl 0.16.5 python-docx 1.1.0
My Word Document
My code
result