Forum


Replies: 1   Views: 3816
Replace table variable html content
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 barlowl2  · 03-11-2015 - 11:18

Hi,

When using a template and replacing a table, how do you convert the html content to word? I read in the help files that you should replaceTableVariable then transform the html to word, however I cannot find any way to do this?

Cheers

Luke

Posted by admin  · 03-11-2015 - 14:53

Hello,

The easiest approach is to do it in two steps:

1. Open the docx as a template and use the replaceTableVariable to replace the placeholders. Instead of adding the HTML, you should add new placeholders. And save then document.

2. Open the previous save document as a new template and then use the replaceVariablebyHTML method to replace the placeholders added in the first step.

Regards.