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.
Edited by Sven May ·
17-02-2015 - 11:16 Hello!
I try to make a table therefore I use addTable() method.
Inside the table...in a cell I need to suit a HTML content.
I found a solution for it in documetation: http://www.phpdocx.com/introduction/html-to-word-PHP at HTML code embeded within a Word table. (Sorry! I misspelled in my first post)
My problem is: when I do the generation I got the following PHP error message: Call to undefined method Phpdocx\Create\CreateDocx::createWordMLFragment()
What I do wrong?
I would like to avoid to build a HTML table!
What I tried: suit the exmaple source code but it is not work :(
Thanks!Hello,
If you need to replace a placeholder by HTML you need to used the replaceVariableByHTML method:
http://www.phpdocx.com/api-documentation/templates/replace-variable-html-Word-document
What method are you using that return the undefined method?
Regards.
I am affraid i do not understand your question: What method are you using that return the undefined method?
I create a docx object -> $docx = new new CreateDocx();
then $docx->createWordMLFragment() ...and this method was not found.
I tried to run the example code what I found here!
( http://www.phpdocx.com/introduction/html-to-word-PHP at external HTML source part)
This exempale not use replaceVariableByHTML() method.
What I want: I have a HTML content and I have to suit it into a cell. The table is not a HTML table I use addTable() method to build it.
Hello,
Our apologizes, that page seems to be outdated. You need to use the WordFragment class, please check the included examples within the package and read this page:
http://www.phpdocx.com/practical/wordfragments-and-wordml
We're going to fix that mistake in the documentation.
Regards.