You are here

public function PHPExcel_Worksheet::getColumnDimension in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet.php \PHPExcel_Worksheet::getColumnDimension()

Get column dimension at a specific column

Parameters

string $pColumn String index of the column:

Return value

PHPExcel_Worksheet_ColumnDimension

2 calls to PHPExcel_Worksheet::getColumnDimension()
PHPExcel_Worksheet::getColumnDimensionByColumn in vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet.php
Get column dimension at a specific column by using numeric cell coordinates
PHPExcel_Worksheet::_createNewCell in vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet.php
Create a new cell at the specified coordinate

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet.php, line 1337

Class

PHPExcel_Worksheet
PHPExcel_Worksheet

Code

public function getColumnDimension($pColumn = 'A', $create = TRUE) {

  // Uppercase coordinate
  $pColumn = strtoupper($pColumn);

  // Fetch dimensions
  if (!isset($this->_columnDimensions[$pColumn])) {
    if (!$create) {
      return NULL;
    }
    $this->_columnDimensions[$pColumn] = new PHPExcel_Worksheet_ColumnDimension($pColumn);
    if (PHPExcel_Cell::columnIndexFromString($this->_cachedHighestColumn) < PHPExcel_Cell::columnIndexFromString($pColumn)) {
      $this->_cachedHighestColumn = $pColumn;
    }
  }
  return $this->_columnDimensions[$pColumn];
}