private function PHPExcel_Reader_Excel5::_readBIFF5CellRangeAddressFixed 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::_readBIFF5CellRangeAddressFixed()
* Reads a cell range address in BIFF5 e.g. 'A2:B6' or 'A1' * always fixed range * section 2.5.14 * *
Parameters
string $subData: * @return string * @throws PHPExcel_Reader_Exception
2 calls to PHPExcel_Reader_Excel5::_readBIFF5CellRangeAddressFixed()
- PHPExcel_Reader_Excel5::_readBIFF5CellRangeAddressList in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Reader/ Excel5.php - * Read BIFF5 cell range address list * section 2.5.15 * *
- PHPExcel_Reader_Excel5::_readSharedFmla in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Reader/ Excel5.php - * 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.
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Reader/ Excel5.php, line 6088
Class
- PHPExcel_Reader_Excel5
- PHPExcel_Reader_Excel5
Code
private function _readBIFF5CellRangeAddressFixed($subData) {
// offset: 0; size: 2; index to first row
$fr = self::_GetInt2d($subData, 0) + 1;
// offset: 2; size: 2; index to last row
$lr = self::_GetInt2d($subData, 2) + 1;
// offset: 4; size: 1; index to first column
$fc = ord($subData[4]);
// offset: 5; size: 1; index to last column
$lc = ord($subData[5]);
// check values
if ($fr > $lr || $fc > $lc) {
throw new PHPExcel_Reader_Exception('Not a cell range address');
}
// column index to letter
$fc = PHPExcel_Cell::stringFromColumnIndex($fc);
$lc = PHPExcel_Cell::stringFromColumnIndex($lc);
if ($fr == $lr and $fc == $lc) {
return "{$fc}{$fr}";
}
return "{$fc}{$fr}:{$lc}{$lr}";
}