Forum


Replies: 1   Views: 4387
Remove table or 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 markthebro  · 12-08-2015 - 09:33

Is it possible to delete a whole table? I am using a Template where i've got one big row and two columns. Inside of this "big table" in both columns i have a new table with one row and two columns, which get filled with data from the database, if the field is not null or empty. now some fields are null/empty and i want to delete the smaller table out of the template, is this anyhow possible? thanks in regard

Posted by admin  · 12-08-2015 - 12:23

Hello,

UPDATE: Since the release of phpdocx 6, DOCXPath is recommended to accomplish this task.

You can use the deleteTemplateBlock to do what you need: http://www.phpdocx.com/api-documentation/templates/delete-Word-template-block-content

Regards.