XPathNamespace() in Excel2007.php

Topics: User Forum
Feb 3, 2009 at 11:41 AM
I'd like to test PHPExcel with this short script:


$reader = PHPExcel_IOFactory::createReader('Excel2007');

$excel = $reader->load('Test.xlsx');
$sheet = $PHPExcel->getActiveSheet();

$string = $sheet->getCell('A1')->getValue();

I have a problem with this error:

Fatal error: Call to a member function registerXPathNamespace() on a non-object in C:\Dokumente und Einstellungen\ ****** phpexcel\Classes\PHPExcel\Reader\Excel2007.php on line 228

can anybody help me with this problem?
Feb 3, 2009 at 2:23 PM
There must be something in that Excel file which Excel 2007 reader doesn't like. Can you send me the file (erik at phpexcel dot net)?

Feb 3, 2009 at 3:40 PM
You are right, the file was corrupt, I don't know why.

Thanks a lot!