Forum


Replies: 12   Views: 3547
Existing chart and merged documents
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 nbiz  · 10-04-2018 - 12:32

Hello,

I have several templates optimize with optimizeTemplate();

In these templates I have charts which I need to replace/fullfil with values.

After all that the templates are merged to create one document

$Docx = new CreateDocxFromTemplate('../Template/Optimize/Template.docx');
$Values = array(
    // Values
);

$Docx->replaceVariableByText($Values, array('raw' => true));

array_push($DocsToMerge, $Docx->createDocx());

How can I replace/add values to the existing charts? 

Thanks