Skip to content

tsy19900929/docxtpl_dynamic_vertical_merging

Repository files navigation

docxtpl_dynamic_vertical_merging

This package has been created because complex vertical merging or rowspan is limited in docxtpl.

📍 Select one to install

  • download docxtpl_dynamic_vertical_merging.zip && pip3 install docxtpl_dynamic_vertical_merging.zip
  • pip3 install git+https://github.com/tsy19900929/docxtpl_dynamic_vertical_merging.git

⚡ Usage

Following code merges given column(B): row1-3 into a group, row4-6 into a group, row7-9 into a group.
from docxtpldvm import DVM
context = {
't':range(1,10),
'B':DVM([(1,3),(4,6),(7,9)])
}

📺 Examples

▶️ test1

▶️ test2