Closed iclgg closed 2 months ago
This has to do with the way row.cells
works.
Check out this page in the docs and then if you still have questions let me know: https://python-docx.readthedocs.io/en/latest/user/tables.html
Basically, [tc for tc in tr.tc_lst]
with give you the actual value in the w:tc
element. cell in row.cells
gives you the "root" (top-left) w:tc
element for all spanned cells in the merge. So vMerge for that will always be "restart" (when it exists).
Feel free to reopen if you end up with more questions after reading.
When I attempt to process the table through the vMerge attribute of cells, I've noticed that the vMerge value for some cells should be 'continue', yet it actually appears as 'restart'. When I use the code below, I noticed that the vMerge attribute value obtained for the same cell is different in two ways. Is this due to some design intention or is it an error?