Forum


Replies: 3   Views: 3135
Html in table
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 llouis  · 11-04-2013 - 12:13

We tried to find a workaround to add HTML content in a table through the template mechanism.

We wrote a script to generate dynamically a template with a table including tags to replace.
And then in a second time the script created another document with the previously created template and replaced the tags with the function addTemplateVariable that accepts HTML content.

Unfortunately, when we open the final document, Word says that the document is corrupted. It comes from the template dynamically generated. We replaced the template by a template created manually and the problem disappears.

The second point is that the template mechanism can't solve our problem because after some tries I think a template can be add only once in a document.

As we want to generate a document with several tables with different numbers of rows for each ones, it seems the only one solution is that the function addElement could accept HTML content and this element could be added to an array of values in a table.

Could you confirm ?