You are here

public function PHPExcel_Worksheet::insertNewColumnBefore in Loft Data Grids 7.2

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

Insert a new column, updating all possible related data

Parameters

int $pBefore Insert before this one:

int $pNumCols Number of columns to insert:

Return value

PHPExcel_Worksheet

Throws

PHPExcel_Exception

1 call to PHPExcel_Worksheet::insertNewColumnBefore()
PHPExcel_Worksheet::insertNewColumnBeforeByIndex in vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet.php
Insert a new column, updating all possible related data

File

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

Class

PHPExcel_Worksheet
PHPExcel_Worksheet

Code

public function insertNewColumnBefore($pBefore = 'A', $pNumCols = 1) {
  if (!is_numeric($pBefore)) {
    $objReferenceHelper = PHPExcel_ReferenceHelper::getInstance();
    $objReferenceHelper
      ->insertNewBefore($pBefore . '1', $pNumCols, 0, $this);
  }
  else {
    throw new PHPExcel_Exception("Column references should not be numeric.");
  }
  return $this;
}