Doc file is not been generated in basic example

Jan 24, 2011 at 5:43 AM
Edited Jan 24, 2011 at 5:55 AM

hello friends,

   I have followed the procedure shown in documentation.I still dont know how to get those two extension

    1)zip Archive


But i can extrac the zip file...Does it mean the same extension.When i include the basic e.g and run the code.I get the empty page.I am using openoffice and ubuntu operating system

here goes the code

require_once 'word/PHPWord.php';

/ New Word Document
$PHPWord = new PHPWord();

// New portrait section
$section = $PHPWord->createSection();

// Add table
$table = $section->addTable();

for($r = 1; $r <= 10; $r++) { // Loop through rows
    // Add row
    for($c = 1; $c <= 5; $c++) { // Loop through cells
        // Add Cell
        $table->addCell(1750)->addText("Row $r, Cell $c");
// Save File
$objWriter = PHPWord_IOFactory::createWriter($PHPWord, 'Word2007');


Any help

thanks in advance

Jan 25, 2011 at 3:34 PM

It is a bit confusing about the requirements. It would be good to see more documentation about them...and how to tell via your phpinfo page whether you have the requirements or not.

Here is the main page for php_zip

And here is the libxml

related discussion

You might also read the phpExcel discussion board, as the requirements for phpExcel are the same as for phpWord. Good luck!