Class 'XMLWriter' not found when writing Excel2007 files

Topics: Developer Forum
Jan 13, 2010 at 4:25 PM

I'm having trouble creating Excel2007 files in version 1.7.1.  My code works fine when I specify the writer as 'Excel5', but if I change it to

          $objWriter = PHPExcel_IOFactory::createWriter($objExcel, 'Excel2007');

I get the following error message:

          Fatal error: Class 'XMLWriter' not found in /webservices/common/phpexcel_1.7.1/Classes/PHPExcel/Shared/XMLWriter.php on line 66

Any help would be greatly appreciated.

Jan 13, 2010 at 11:41 PM

The problem is with the configuration of the PHP installation. Check with phpinfo(). There should be an entry for xmlwriter:

Jan 15, 2010 at 1:51 PM

Yes, that fixed my problem.  Thank you very much for your help.

Jan 18, 2015 at 10:15 AM