+1 vote

I am struggling with creating a descent Excel template which can contain the complete content of the shopping cart of a document.

I found this (Efficy2012) explenation of a RTF-template, but I did not manage to get the same result with Excel: https://help.efficy.com/user/e2012_templates_example_detailtable

[$GetRtfTable("Prod", filter=" quantity=0" sum=Total)]
<#H=Name> <#H=Quantity> <#H=Price> <#H=Total><#repeat>
<#F=Name> <#F=Quantity> <#F=Price> <#F=Total></#repeat>
<#sum> <#F=Total></#sum>
[/$]

When creating a template in Excel I only manage to export the first first. How to solve this?
Or in other words: how to use 'repeat' In excel?

asked in How to by (219 points)

1 Answer

0 votes

This is not possible. You cannot use the <#repeat> tag to fill multiple rows and cells. The Excel merge support is more or less limited to replacing cell values.

When the format is XLSX, the merge happens on the raw file. Efficy unzips the XLSX and replaces each tag that it finds in the XML files with the value from the merge context. The modified files are stored and zipped again. With template scripts, you could try to generate the XML that assembles the excel table, but that is no easy job imo.

answered by (7.4k points)
Ok thanks. In that case I think it is easier (or at least more comparable to the Efficy standard) to create a new grid on a tab at the project entity which can be exported with all the content.
I like this alternative!
Welcome to Efficy Overflow, where you can ask questions and receive answers from other members of the community.
1,248 questions
1,518 answers
1,858 comments
328 users