You are here

private function PHPExcel_Reader_Excel5::_readSharedFmla 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::_readSharedFmla()

* Read a SHAREDFMLA record. This function just stores the binary shared formula in the reader, * which usually contains relative references. * These will be used to construct the formula in each shared formula part after the sheet is read.

2 calls to PHPExcel_Reader_Excel5::_readSharedFmla()
PHPExcel_Reader_Excel5::load in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php
* Loads PHPExcel from file * *
PHPExcel_Reader_Excel5::_readFormula in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php
* Read FORMULA record + perhaps a following STRING record if formula result is a string * This record contains the token array and the result of a * formula cell. * * -- "OpenOffice.org's Documentation of the Microsoft * Excel…

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php, line 3932

Class

PHPExcel_Reader_Excel5
PHPExcel_Reader_Excel5

Code

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

  // offset: 0, size: 6; cell range address of the area used by the shared formula, not used for anything
  $cellRange = substr($recordData, 0, 6);
  $cellRange = $this
    ->_readBIFF5CellRangeAddressFixed($cellRange);

  // note: even BIFF8 uses BIFF5 syntax
  // offset: 6, size: 1; not used
  // offset: 7, size: 1; number of existing FORMULA records for this shared formula
  $no = ord($recordData[7]);

  // offset: 8, size: var; Binary token array of the shared formula
  $formula = substr($recordData, 8);

  // at this point we only store the shared formula for later use
  $this->_sharedFormulas[$this->_baseCell] = $formula;
}