PHPWord unable to embed PHPExcel spreadsheet

Topics: Developer Forum, User Forum
Mar 14, 2013 at 3:59 PM
I'm creating a PHP application which generates a Word document in which some excel spreadsheets are embedded.

PHPWord is unable to embed xslx objects, so I have tried the .xls output of PHPExcel (PHPExcel_Writer_Excel5).

PHPWord generates a Word file with the PHPExcel excel file embedded. But it is not possible to open the embedded Excel file. A 'Convert File' window opens with the text 'Convert file from:' and then there is a dropdown menu with various choices (Plain Text, Encoded Text, Rich Text Format and so on).

However if I save an Excel file in xls format (Excel 97-2003) and use PHPWord to generate a Word document embedding this excel file, I can later open the embedded excel.

So the xls format PHPExcel generates must be different from the one MS Excel generates.

Do you have any suggestion about how to solve this problem?