You are here

public function PHPExcel_Worksheet_PageSetup::getPrintArea in Loft Data Grids 6.2

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

* Get print area * *

Parameters

int $index Identifier for a specific print area range if several ranges have been set: * Default behaviour, or a index value of 0, will return all ranges as a comma-separated string * Otherwise, the specific range identified by the value of $index will be returned * Print areas are numbered from 1 * @throws PHPExcel_Exception * @return string

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/PageSetup.php, line 574

Class

PHPExcel_Worksheet_PageSetup
PHPExcel_Worksheet_PageSetup

Code

public function getPrintArea($index = 0) {
  if ($index == 0) {
    return $this->_printArea;
  }
  $printAreas = explode(',', $this->_printArea);
  if (isset($printAreas[$index - 1])) {
    return $printAreas[$index - 1];
  }
  throw new PHPExcel_Exception("Requested Print Area does not exist");
}