diff --git a/Classes/PHPExcel/Shared/OLERead.php b/Classes/PHPExcel/Shared/OLERead.php index f67eeac3..6f2696ed 100644 --- a/Classes/PHPExcel/Shared/OLERead.php +++ b/Classes/PHPExcel/Shared/OLERead.php @@ -251,19 +251,22 @@ class PHPExcel_Shared_OLERead { $name = str_replace("\x00", "", substr($d,0,$nameSize)); + $this->props[] = array ( 'name' => $name, 'type' => $type, 'startBlock' => $startBlock, 'size' => $size); + // tmp helper to simplify checks + $upName = strtoupper($name); + // Workbook directory entry (BIFF5 uses Book, BIFF8 uses Workbook) - if (($name == 'Workbook') || ($name == 'Book') || ($name == 'WORKBOOK') || ($name == 'BOOK')) { + if (($upName === 'WORKBOOK') || ($upName === 'BOOK')) { $this->wrkbook = count($this->props) - 1; } - - // Root entry - if ($name == 'Root Entry' || $name == 'ROOT ENTRY' || $name == 'R') { + else if ( $upName === 'ROOT ENTRY' || $upName === 'R') { + // Root entry $this->rootentry = count($this->props) - 1; }