open-xml-templating / docxtemplater

Generate docx, pptx, and xlsx from templates (Word, Powerpoint and Excel documents), from Node.js or the browser. Demo: https://www.docxtemplater.com/demo. #docx #office #generator #templating #report #json #generate #generation #template #create #pptx #docx #xlsx #react #vuejs #angularjs #browser #typescript #image #html #table #chart
https://www.docxtemplater.com
Other
3.03k stars 349 forks source link

Numbering for conditional text #740

Closed PhilGarb closed 8 months ago

PhilGarb commented 9 months ago

When I have a conditional ordered list entry the other list entries are not automatically renumbered. I understand that the renumbering probably happens as a side effect of actively deleting the list entry in word and is not part of the xml. I do however wonder whether there is a way to renumber the list in these cases, because otherwise the output is not very desirable.

Since the issue is quite basic I hope a reproduction is not necessary. If you need one let me know.

edi9999 commented 9 months ago

Hello @PhilGarb ,

I would prefer to have a reproduction template as I want to be 100% sure what you're trying to achieve.

But yes, numbering is not reset by loops and can cause issues when used within loops or conditions.

edi9999 commented 8 months ago

Could you please provide a reproduction ?

PhilGarb commented 8 months ago

Ahh I'm sorry this got lost in my notifications.

We noticed that this was not actually an issue, but a wrongly configured numbering in the document itself. Sorry for the unnecessary issue.