Problem instantiating PHPExcel_Reader_Excel5

Topics: User Forum
Feb 4, 2009 at 2:13 PM
Hi folks,

I've got the latest PHPExcel, and am running it on XAMPP locally. I can instantiate a PHPExcel() object but not a PHPExcel_Reader_Excel5() one. Any ideas?

Code from a simple test file is:

set_include_path(get_include_path() . PATH_SEPARATOR . 'classes/PHPExcel/');
include 'PHPExcel.php';
$objReader = new PHPExcel_Reader_Excel5();

This gives the error "Fatal error: Class 'PHPExcel_Reader_Excel5' not found"

If I replace the ast line with $objPHPExcel = new PHPExcel(); there's no error ...
Am I missing out something? The doc says the line $objReader = new PHPExcel_Reader_Excel5(); is all that's required.

Feb 4, 2009 at 2:15 PM
OK, sorry - just found via another post, that another include is required .. seem to be up and running now.

include 'PHPExcel/Reader/Excel5.php';

Sorry again.