You are here

private function PHPExcel_Reader_Excel5::_readExternSheet in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php \PHPExcel_Reader_Excel5::_readExternSheet()

* Read EXTERNSHEET record

1 call to PHPExcel_Reader_Excel5::_readExternSheet()
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 2688

Class

PHPExcel_Reader_Excel5
PHPExcel_Reader_Excel5

Code

private function _readExternSheet() {
  $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;

  // external sheet references provided for named cells
  if ($this->_version == self::XLS_BIFF8) {

    // offset: 0; size: 2; number of following ref structures
    $nm = self::_GetInt2d($recordData, 0);
    for ($i = 0; $i < $nm; ++$i) {
      $this->_ref[] = array(
        // offset: 2 + 6 * $i; index to EXTERNALBOOK record
        'externalBookIndex' => self::_GetInt2d($recordData, 2 + 6 * $i),
        // offset: 4 + 6 * $i; index to first sheet in EXTERNALBOOK record
        'firstSheetIndex' => self::_GetInt2d($recordData, 4 + 6 * $i),
        // offset: 6 + 6 * $i; index to last sheet in EXTERNALBOOK record
        'lastSheetIndex' => self::_GetInt2d($recordData, 6 + 6 * $i),
      );
    }
  }
}