Forum


Replies: 3   Views: 1115
Delete entire table if no data
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 admin  · 07-12-2021 - 18:11

Hello,

It's a very good approach. An alternative solution, that could be faster because you don't need to call replaceTableVariable to add a DeleteDelete string, would be removing the tables that contain placeholders (or empty data) after all replacements have been done. If a table contains placeholders then no data has been added and it could be removed.

We have updated the reply with the deleteTemplateBlock information that was removed by mistake :)

Regards.