Ejemplo n.º 1
0
 /**
  * Read WINDOW2 record
  */
 private function _readWindow2()
 {
     $length = $this->_GetInt2d($this->_data, $this->_pos + 2);
     $recordData = substr($this->_data, $this->_pos + 4, $length);
     // move stream pointer to next record
     $this->_pos += 4 + $length;
     // offset: 0; size: 2; option flags
     $options = $this->_GetInt2d($recordData, 0);
     // bit: 1; mask: 0x0002; 0 = do not show gridlines, 1 = show gridlines
     $showGridlines = (bool) ((0x2 & $options) >> 1);
     $this->_phpSheet->setShowGridlines($showGridlines);
     // bit: 2; mask: 0x0004; 0 = do not show headers, 1 = show headers
     $showRowColHeaders = (bool) ((0x4 & $options) >> 2);
     $this->_phpSheet->setShowRowColHeaders($showRowColHeaders);
     // bit: 3; mask: 0x0008; 0 = panes are not frozen, 1 = panes are frozen
     $this->_frozen = (bool) ((0x8 & $options) >> 3);
     // bit: 6; mask: 0x0040; 0 = columns from left to right, 1 = columns from right to left
     $this->_phpSheet->setRightToLeft((bool) ((0x40 & $options) >> 6));
     // bit: 10; mask: 0x0400; 0 = sheet not active, 1 = sheet active
     $isActive = (bool) ((0x400 & $options) >> 10);
     if ($isActive) {
         $this->_phpExcel->setActiveSheetIndex($this->_phpExcel->getIndex($this->_phpSheet));
     }
 }