You are here

public static function PHPExcel_Cell::coordinateFromString in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell.php \PHPExcel_Cell::coordinateFromString()

* Coordinate from string * *

Parameters

string $pCoordinateString: * @return array Array containing column and row (indexes 0 and 1) * @throws PHPExcel_Exception

42 calls to PHPExcel_Cell::coordinateFromString()
PHPExcel_Calculation::extractNamedRange in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php
* Extract range values * *
PHPExcel_Calculation::_processTokenStack in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php
PHPExcel_Calculation_LookupRef::OFFSET in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/LookupRef.php
* OFFSET * * Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells. * The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and * the…
PHPExcel_Cell::absoluteCoordinate in vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell.php
* Make string coordinate absolute * *
PHPExcel_Cell::getRangeBoundaries in vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell.php
* Calculate range boundaries * *

... See full list

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell.php, line 580

Class

PHPExcel_Cell
PHPExcel_Cell

Code

public static function coordinateFromString($pCoordinateString = 'A1') {
  if (preg_match("/^([\$]?[A-Z]{1,3})([\$]?\\d{1,7})\$/", $pCoordinateString, $matches)) {
    return array(
      $matches[1],
      $matches[2],
    );
  }
  elseif (strpos($pCoordinateString, ':') !== FALSE || strpos($pCoordinateString, ',') !== FALSE) {
    throw new PHPExcel_Exception('Cell coordinate string can not be a range of cells');
  }
  elseif ($pCoordinateString == '') {
    throw new PHPExcel_Exception('Cell coordinate can not be zero-length string');
  }
  throw new PHPExcel_Exception('Invalid cell coordinate ' . $pCoordinateString);
}