Forum


Replies: 3   Views: 3234
Use replacetablevariable between two specific placeholders
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 krishna shah  · 10-12-2015 - 07:57

Hello,
When using a replaceTableVariable, it replaces all the variables available in any other table with the same name in word document. Can I use replaceTableVariable for only single table? Or Is it possible to replace variables between two specific placeholders?

e.g.
$startReport$
     First Name  | Last Name
     $firstname$ | $lastname$
$endReport$

And I need to replace these $firstname$ and $lastname$ variables (with single or multiple values) between $startReport$ and $endReport$ only. $firstname$ or $lastname$ should not be replace if they exist in any other section within same document.

Posted by admin  · 10-12-2015 - 10:58

Hello,

What version and license of phpdocx are you using?

Regards.

Posted by krishna shah  · 11-12-2015 - 05:19

Hello,

Currently I am using a trial version of phpdocx library, But I can opt for an Enterprice version if my needs will be fulfilled with that.

Thank you in advance. 

Posted by admin  · 11-12-2015 - 08:34

Hello,

Yes, it's easy to be done using the Corporate or Enterprise licenses. After you purchase the license please write an email to contact[at]phpdocx.com and we'll send you a sample script.

Regards.