Forum


Replies: 3   Views: 3984
Inserting rows in an existing 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 pestes  · 14-08-2014 - 13:09

I have a template that has a table already in it that I need to insert multiple rows into the middle of. There was a way I could do this with version 3.6, but we have recently bought version 4.0. Is there a way that I can accomplish this using the latest version of phpdocx? Thanks!

Posted by admin  · 18-08-2014 - 08:14

Hi, How did you do that with phpdocx 3.6? To suggest a similar approach. Regards.

Posted by pestes  · 22-08-2014 - 15:24

I built an array of values that would populate the row and then used the following line to add the array to the existing table. $docx->addTemplateVariable( $document_array, 'table', array( 'header' => false));

Posted by admin  · 25-08-2014 - 09:38

Hello, You can use replaceTableVariable to use a similar approach. Please check the available examples in Templates/replateTableVariable/. Regards.