I realize I'm very late to this discussion, but I've just encountered this problem, and I was hoping you might be able to help me understand how you managed to work around the issue. I'm downloading an XLS file using CURL in PHP, and saving the file to disk, then trying to parse it using the PHPExcel reader. Here's my basic implementation.
$fp = fopen('output/myfile.xls', 'wb');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.example.com/excelfileurl');
curl_setopt($ch, CURLOPT_COOKIE, ' SOME SESSION COOKIE STUFF HERE THAT I'VE OMITTED FROM MY EXAMPLE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_exec($ch);
curl_close($ch);
fclose($fp);
require_once './Classes/PHPExcel/IOFactory.php';
$objPHPExcel = PHPExcel_IOFactory::load("output/myfile.xls");
So it seems like PHPExcel should have direct access to the file since it's sitting on the disk. But I'm seeing the following errors leading me to believe that the XLS file is being read as HTML instead of XLS. I'm able to open the XLS file with Excel and it opens fine.Notice: DOMDocument::loadHTMLFile(): Namespace prefix ss is not defined in output/myfile.xls, line: 2 in /<full path>/Classes/PHPExcel/Reader/HTML.php on line 427
Warning: DOMDocument::loadHTMLFile(): Namespace prefix xmlns of attribute ss is not defined in output/myfile.xls, line: 2 in /<full path>/Classes/PHPExcel/Reader/HTML.php on line 427
Thanks for any suggestions you may have.