Create documents using templates and Microsoft® Word
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist inquid/yii-microsoft-word "*"
or add
"inquid/yii-microsoft-word": "*"
to the require section of your composer.json
file.
Once the extension is installed, simply use it in your code by :
$executer = new \inquid\word\TemplateExecuter();
$template = $executer->execute([['name' , 'Luis Armando González'], ['email' , 'contact@inquid.co']]);
$executer->saveDocument($template, 'Default.docx');