Forum


Replies: 7   Views: 1519
Mergedocx fails in specific circumstances with an ole chart
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  · 20-05-2021 - 05:19

Hello,

Maybe the DOCX document includes object charts (instead of regular charts)? Please do the following minor change:

  1. Edit MultimeMerge.php (classes folder)
  2. In phpdocx 11, go to line 1005 and replace the following line:
$queryXlsxRels = '//r:Relationship[@Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"]';

by this new line:

$queryXlsxRels = '//r:Relationship[@Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/package" or @Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"]';

and try again. Regular charts are supported in the merge method, but object charts support is only included in the current testing branch (the previous change adds support) but it's not available in the stable package (it will be included in the next release of phpdocx; there's no release date).

If you send to contact[at]phpdocx.com the DOCX documents you are merging we'll check them.

Regards.