diff --git a/Classes/PHPExcel/Reader/Excel2003XML.php b/Classes/PHPExcel/Reader/Excel2003XML.php index de868111..e86e165d 100644 --- a/Classes/PHPExcel/Reader/Excel2003XML.php +++ b/Classes/PHPExcel/Reader/Excel2003XML.php @@ -174,7 +174,7 @@ class PHPExcel_Reader_Excel2003XML implements PHPExcel_Reader_IReader // $signature = array( - '', + '' ); @@ -188,16 +188,10 @@ class PHPExcel_Reader_Excel2003XML implements PHPExcel_Reader_IReader $data = fread($fh, 2048); fclose($fh); - $headers = explode("\n",$data); $valid = true; - foreach($signature as $key => $match) { - if (isset($headers[$key])) { - $line = trim(rtrim($headers[$key], "\r\n")); - if ($line != $match) { - $valid = false; - break; - } - } else { + foreach($signature as $match) { + // every part of the signature must be present + if (strpos($data, $match) === false) { $valid = false; break; } diff --git a/changelog.txt b/changelog.txt index 8bbc7606..21b68ba4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -39,6 +39,7 @@ Fixed in SVN: - Bugfix: (MBaker) Work item 13215 - Formatting get lost and edit a template XLSX file - Bugfix: (MBaker) Work item 14029 - Excel 2007 Reader /writer lost fontcolor - Bugfix: (MBaker) Work item 13374 - file that makes cells go black +- Bugfix: (MBaker) Minor patchfix for Excel2003XML Reader when XML is defined with a charset attribute - General: (MBaker) Improved performance (speed), for building the Shared Strings table in the Excel2007 Writer.