function PHPExcel_Writer_Excel5_Parser::_convertRef3d in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Parser.php \PHPExcel_Writer_Excel5_Parser::_convertRef3d()
* Convert an Excel 3d reference such as "Sheet1!A1" or "Sheet1:Sheet2!A1" to a * ptgRef3d. * * @access private *
Parameters
string $cell An Excel cell reference: * @return mixed The packed ptgRef3d token on success.
1 call to PHPExcel_Writer_Excel5_Parser::_convertRef3d()
- PHPExcel_Writer_Excel5_Parser::_convert in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel5/ Parser.php - * Convert a token to the proper ptg value. * * @access private *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel5/ Parser.php, line 748
Class
- PHPExcel_Writer_Excel5_Parser
- PHPExcel_Writer_Excel5_Parser
Code
function _convertRef3d($cell) {
// $class = 2; // as far as I know, this is magick.
// Split the ref at the ! symbol
list($ext_ref, $cell) = explode('!', $cell);
// Convert the external reference part (different for BIFF8)
$ext_ref = $this
->_getRefIndex($ext_ref);
// Convert the cell reference part
list($row, $col) = $this
->_cellToPackedRowcol($cell);
// The ptg value depends on the class of the ptg.
// if ($class == 0) {
// $ptgRef = pack("C", $this->ptg['ptgRef3d']);
// } elseif ($class == 1) {
// $ptgRef = pack("C", $this->ptg['ptgRef3dV']);
// } elseif ($class == 2) {
$ptgRef = pack("C", $this->ptg['ptgRef3dA']);
// } else {
// throw new PHPExcel_Writer_Exception("Unknown class $class");
// }
return $ptgRef . $ext_ref . $row . $col;
}