Forum


Replies: 1   Views: 3761
Adding unknown number of tables to a template
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 gavin_ogorman  · 29-08-2014 - 08:44

Hey, I see in version 4.0 that "one may insert arbitrary Word content anywhere within the template.". Are there any example of how to do this? I have a template which contains a section which will contain several tables. At the moment, I just use a single variable, generate multiple HTML tables from my arrays and then use replaceVariableByHTML to put in the tables where that single variable is. It would be much nicer to be able to just use the addTable function at the specific location I want the various tables. I could then get rid of all my code to generate HTML tables from arrays. Is this possible, and if so, any pointers? Thanks, Gavin

Posted by admin  · 29-08-2014 - 09:15

Hello, Please check the included phpdoc for these methods: insertWordContent insertWordFragmentAfter insertWordFragmentBefore Regards.