Forum


Replies: 2   Views: 1230
Repeat template table row
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by Exorion  · 16-11-2020 - 08:59

Hi guys! Is it possible to use a replaceTableVariable and repeat row as many times as i want (the number of rows is connected with my data array)?

 

Posted by admin  · 16-11-2020 - 09:44

Hello,

Using replaceTableVariable you can clone and replace rows as detailed on the documentation pages and the included samples: https://www.phpdocx.com/api-documentation/templates/replace-table-variable-Word-document. This is using placeholders to set the values to be added when changing the template.

To clone rows without using replaceTableVariable you can use cloneWordContent, available in Advanced and Premium licenses since the release of phpdocx 6.5.

We recommend you to check documentation and the samples of both methods,

Regards.

Posted by Exorion  · 16-11-2020 - 10:26

Thanks a lot!