Open retsyo opened 6 years ago
I put your request to the enhancement wish list...
Hi, how is it going with this enhancement? i have a similar table to create and I realized that jinja style template just doesn't accept any of my tries. It seems that nested FOR loops in one table is not possible. (see my examples) It also tried to correct the merging with docx but no luck... Tests_docx_tables.docx
Thanks in advance for improving this very promising package!
it is better to transform
gauche = [[G11,G12,G13],[G21,G22,G23]]
droite = [[D11,D12,D13],[D21,D22,D23]]
into :
lignes = [[G11,G12,G13,D11,D12,D13],[G21,G22,G23,D21,D22,D23]]
So only one loop by row is needed.
Yes, I did it that way only to test if it is possible to align several loops next to each other, but apparently not. Therefore, I would like to know if there is another way to write the second table in my docx file (the table I would like to have as result). It is a very similar problem of complex tables as proposed in the first post.
Finally, I have to launch MsWord via win32com, then merge the cells by writing python code.
I do expect there will be an easy way without opening MsWord
in my real work situation, I have to create a complex tab which you can read in the attachment
so, is there any way to implement it in python-docx-template?
in my demo docx file, there are only for categories(Book, DVD, Milk and Bag), but in fact I have many tables which has different numbers of categories, and varing number goods in every category.
category.docx