2 ini_set('include_path', __DIR__ . '/../../..:.');
3 require_once __DIR__ . '/../Writer.php';
6 $PHPWord = new Document_Word_Writer();
8 // New portrait section
9 $section = $PHPWord->createSection();
12 $section->addText('You can open this OLE object by double clicking on the icon:');
13 $section->addTextBreak(2);
16 $section->addObject('_sheet.xls');
19 require_once __DIR__ . '/../Writer/IOFactory.php';
20 $objWriter = Document_Word_Writer_IOFactory::createWriter($PHPWord, 'Word2007');
21 $objWriter->save('/tmp/Object.docx');