You are here

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

* Reads a cell address in BIFF8 e.g. 'A2' or '$A$2' * section 3.3.4 * *

Parameters

string $cellAddressStructure: * @return string

2 calls to PHPExcel_Reader_Excel5::_readBIFF8CellAddress()
PHPExcel_Reader_Excel5::_getNextToken in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php
* Fetch next token from binary formula data * *
PHPExcel_Reader_Excel5::_readNote in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php
* The NOTE record specifies a comment associated with a particular cell. In Excel 95 (BIFF7) and earlier versions, * this record stores a note (cell note). This feature was significantly enhanced in Excel 97.

File

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

Class

PHPExcel_Reader_Excel5
PHPExcel_Reader_Excel5

Code

private function _readBIFF8CellAddress($cellAddressStructure) {

  // offset: 0; size: 2; index to row (0... 65535) (or offset (-32768... 32767))
  $row = self::_GetInt2d($cellAddressStructure, 0) + 1;

  // offset: 2; size: 2; index to column or column offset + relative flags
  // bit: 7-0; mask 0x00FF; column index
  $column = PHPExcel_Cell::stringFromColumnIndex(0xff & self::_GetInt2d($cellAddressStructure, 2));

  // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index)
  if (!(0x4000 & self::_GetInt2d($cellAddressStructure, 2))) {
    $column = '$' . $column;
  }

  // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index)
  if (!(0x8000 & self::_GetInt2d($cellAddressStructure, 2))) {
    $row = '$' . $row;
  }
  return $column . $row;
}