We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like to create a table like the example image below. I tried to use a nested for loop like
However this seems to ignore the initial loop and gives this:
Is there a way of using nested loops?
Here is the code used to render the template:
from docxtpl import DocxTemplate tpl = DocxTemplate('template.docx') context = { 'data': [ {'type': 'Fruit', 'names': ['Apple', 'Banana']}, {'type': 'Vegetable', 'names': ['Carrot', 'Onion']}, ] } tpl.render(context) tpl.save('output/result.docx')
The text was updated successfully, but these errors were encountered:
I have the same question. It seems like nested tr loops are not supported yet. Will this be added to the plan? It would be very useful. @elapouya
Sorry, something went wrong.
Hi, this template produces the desired output:
No branches or pull requests
Describe your problem
I would like to create a table like the example image below. I tried to use a nested for loop like
However this seems to ignore the initial loop and gives this:
Is there a way of using nested loops?
More details about your problem
Here is the code used to render the template:
The text was updated successfully, but these errors were encountered: