PHPDocX
PHPDOCX is a PHP library designed to generate completely dynamic and fully customizable Word documents including grahics, headers and footers, charts, table of contents and many more. The reports and documents may be built from any available data source like a MySQL database (or any other database) or a spreadsheet. The resulting documents remain fully editable in Microsoft Word and therefore the final users are able to modify them as necessary. Templates support, new conversion plug in.