You are here

public function PHPExcel::getSheet in Loft Data Grids 7.2

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

Get sheet by index

Parameters

int $pIndex Sheet index:

Return value

PHPExcel_Worksheet

Throws

PHPExcel_Exception

1 call to PHPExcel::getSheet()
PHPExcel::getActiveSheet in vendor/phpoffice/phpexcel/Classes/PHPExcel.php
Get active sheet

File

vendor/phpoffice/phpexcel/Classes/PHPExcel.php, line 573

Class

PHPExcel
PHPExcel

Code

public function getSheet($pIndex = 0) {
  if (!isset($this->_workSheetCollection[$pIndex])) {
    $numSheets = $this
      ->getSheetCount();
    throw new PHPExcel_Exception("Your requested sheet index: {$pIndex} is out of bounds. The actual number of sheets is {$numSheets}.");
  }
  return $this->_workSheetCollection[$pIndex];
}