This project is read-only.

Load Preformatted File and Enter Data

Jul 2, 2013 at 7:56 PM
I have a client that needs excel files and word files generated dynamically from data in the database. I used PHPExcel for the excel files and it works great.

I now need to load a preformatted file just like I did in PHPExcel using the filereaders. Here is my code but it does not load the file.
//generate word file for gwentries
$PHPWord = new PHPWord();
$document = $PHPWord->loadTemplate(APPPATH.'files/gwsw.doc');

// save file
$wordWriter = PHPWord_IOFactory::createWriter($PHPWord, 'Word2007');
Any help would be great. Thanks
Jul 2, 2013 at 7:57 PM
It does generate the file "test.doc" but the file is completely empty.