diff --git a/Classes/PHPExcel/Reader/Excel5.php b/Classes/PHPExcel/Reader/Excel5.php index c1f9c1fc..0ff17e02 100644 --- a/Classes/PHPExcel/Reader/Excel5.php +++ b/Classes/PHPExcel/Reader/Excel5.php @@ -720,6 +720,7 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader case self::XLS_Type_SHEETLAYOUT: $this->_readSheetLayout(); break; case self::XLS_Type_SHEETPROTECTION: $this->_readSheetProtection(); break; case self::XLS_Type_RANGEPROTECTION: $this->_readRangeProtection(); break; + case self::XLS_Type_NOTE: $this->_readNote(); break; //case self::XLS_Type_IMDATA: $this->_readImData(); break; case self::XLS_Type_CONTINUE: $this->_readContinue(); break; case self::XLS_Type_EOF: $this->_readDefault(); break 2; @@ -744,7 +745,8 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader // treat OBJ records foreach ($this->_objs as $n => $obj) { - +// echo 'Object ID is ',$n,'
'; +// // the first shape container never has a corresponding OBJ record, hence $n + 1 $spContainer = $allSpContainers[$n + 1]; @@ -771,6 +773,11 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader switch ($obj['type']) { + case 0x19: + // Note +// echo 'Comment Object
'; + break; + case 0x08: // picture @@ -1277,6 +1284,30 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader $this->_pos += 4 + $length; } + private function _readNote() + { +// echo 'Read Note
'; + $length = self::_GetInt2d($this->_data, $this->_pos + 2); + $recordData = substr($this->_data, $this->_pos + 4, $length); + + // move stream pointer to next record + $this->_pos += 4 + $length; + + if ($this->_readDataOnly || $this->_version != self::XLS_BIFF8) { + return; + } + +// hexDump($recordData); +// + $cellAddress = $this->_readBIFF8CellAddress(substr($recordData, 0, 4)); + $noteObjID = self::_GetInt2d($recordData, 6); + $noteAuthor = trim(substr($recordData, 8)); + +// echo 'Note Address=',$cellAddress,'
'; +// echo 'Note Object ID=',$noteObjID,'
'; +// echo 'Note Author=',$noteAuthor,'
'; + } + /** * Read BOF */