private function PHPExcel_Reader_Excel5::_readSheetLayout in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php \PHPExcel_Reader_Excel5::_readSheetLayout()
* Read SHEETLAYOUT record. Stores sheet tab color information.
1 call to PHPExcel_Reader_Excel5::_readSheetLayout()
- PHPExcel_Reader_Excel5::load in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Reader/ Excel5.php - * Loads PHPExcel from file * *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Reader/ Excel5.php, line 4837
Class
- PHPExcel_Reader_Excel5
- PHPExcel_Reader_Excel5
Code
private function _readSheetLayout() {
$length = self::_GetInt2d($this->_data, $this->_pos + 2);
$recordData = $this
->_readRecordData($this->_data, $this->_pos + 4, $length);
// move stream pointer to next record
$this->_pos += 4 + $length;
// local pointer in record data
$offset = 0;
if (!$this->_readDataOnly) {
// offset: 0; size: 2; repeated record identifier 0x0862
// offset: 2; size: 10; not used
// offset: 12; size: 4; size of record data
// Excel 2003 uses size of 0x14 (documented), Excel 2007 uses size of 0x28 (not documented?)
$sz = self::_GetInt4d($recordData, 12);
switch ($sz) {
case 0x14:
// offset: 16; size: 2; color index for sheet tab
$colorIndex = self::_GetInt2d($recordData, 16);
$color = self::_readColor($colorIndex, $this->_palette, $this->_version);
$this->_phpSheet
->getTabColor()
->setRGB($color['rgb']);
break;
case 0x28:
// TODO: Investigate structure for .xls SHEETLAYOUT record as saved by MS Office Excel 2007
return;
break;
}
}
}