Class not found when executing page

Topics: Developer Forum, User Forum
Sep 26, 2012 at 8:58 PM
Edited Sep 26, 2012 at 8:59 PM

Class 'XMLWriter' not found in /var/www/Classes/PHPExcel/Shared/XMLWriter.php on line 44

I am a bit of a newbie, so please bear with me, and thank you in advance for your assistance.

Line 44 contains the following:

class PHPExcel_Shared_XMLWriter extends XMLWriter {

The code I'm currently executing to get to this point is this:

<?php
// Start Includes //

include '/dir/foo/bar/Classes/PHPExcel.php';

// End Includes //


// Start Global Variables //

$Name 		= "Company1";
$File 		= "Meta_" . $Name . ".xls";
$Directory 	= "/dir/";

// End Global Variables //

$objPHPexcel = PHPExcel_IOFactory::load('/dir/MetaTemplate_ ' . $Name . '.xls');

$ws = new PHPExcel_Writer_Excel2007($objPHPexcel);
$ws->setPreCalculateFormulas(false);

$cacheMethod 	= PHPExcel_CachedObjectStorageFactory::cache_to_discISAM;
$cacheSettings 	= array( 'dir'  => '/tmp' );
PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings);

$ws->save($Directory . $File);

?>

I've gone through the documentation, but I'm sure I'm likely missing something, here and I'm not really sure what it is? Any help pointing me in the right direction would be greatly appreciated. Again thank you, and I love these classes, excellent job!

Sep 26, 2012 at 9:50 PM

do you have xmlwriter support in your php installation? (have a look at phpinfo())

Sep 27, 2012 at 3:44 PM
Edited Sep 27, 2012 at 4:02 PM
borft wrote:

do you have xmlwriter support in your php installation? (have a look at phpinfo())

 

I don't see it, I'll talk to the server admin who set it up. I have XML Support, but not XMLWriter. I just code, they're the ones who were supposed to install it into PHP. Hah.

On a side note, the test pages work fine.