Open ching2018 opened 4 years ago
I confirm this corruption in this case.
I don't know yet exactly why it happens, I have to investigate further.
Thanks a lot!
Hello again,
Could you please explain what you would want to have as the output ?
The ACCOUNT_DETAIL loop will create one row for each element of the ACCOUNT_DETAIL array.
The $isLast loop will put either "." or ";", and it will put ";" for almost all ACCOUNT_DETAIL elements except for the last ACCOUNT_DETAIL loop
However, it is not clear to me what you want to achieve with the DETAIL loop.
In docxtemplater, when a loop tag starts in a table cell and ends in another table cell, the loop will be expanded to a table row, which means that it will create a row for each element in the array.
However, with the placement of your tags, it is I think not what you want.
This is still a bug, the docx should not get corrupted, a proper error should be shown if we want to error because this is an invalid usage of loop.
The two problems are the same, and my goal is to merge the cells in the loop. I look forward to seeing you implement this feature soon, and I will buy it. I'm sure that's what many people need.
loop-table.docx