Class 'XMLWriter' not found when writing Excel2007 files

Topics: Developer Forum
Jan 13, 2010 at 5: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.

Developer
Jan 14, 2010 at 12:41 AM

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

http://img216.imageshack.us/img216/9333/phpinfo.png

Jan 15, 2010 at 2:51 PM

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

Jan 18, 2015 at 11:15 AM