Fatal error: Class 'PHPExcel_Worksheet' not found in /var/www/myapp/lib/Classes/PHPExcel.php on line 133,

Topics: Developer Forum
Oct 1, 2010 at 9:54 AM

I have this problem, I was copy classes folder to my lib folder also I'm put in my autoload function path to file PHPExcel.php is there something that I miss?

Oct 1, 2010 at 12:33 PM

I added to my __autoload  function next line


it works for my project, may be it will help you

Oct 1, 2010 at 12:43 PM

As igordulger has pointed out, if you are already using other scripts with an autoloader, then this may clash with, or be overridden by, the PHPExcel autoloader.

If you have:

function __autoload($class) {

Do this instead:

function myAutoload($class) {

Your autoloader will then co-exist with the autoloader of PHPExcel.

Oct 1, 2010 at 12:46 PM

I just fix the problem, it was in str replace logic which has been used in PHPEcel_Autoloader...


I put in my autoloader this one

        require_once (PHPEXCEL_ROOT.str_replace('_','/',$className).'.php');

and that was the main problem, so you replace '_' with '/'