You are here

public function PHPExcel_Worksheet_PageSetup::clearPrintArea 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::clearPrintArea()

* Clear a print area * *

Parameters

int $index Identifier for a specific print area range if several ranges have been set: * Default behaviour, or an index value of 0, will clear all print ranges that are set * Otherwise, the range identified by the value of $index will be removed from the series * Print areas are numbered from 1 * @return PHPExcel_Worksheet_PageSetup

File

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

Class

PHPExcel_Worksheet_PageSetup
PHPExcel_Worksheet_PageSetup

Code

public function clearPrintArea($index = 0) {
  if ($index == 0) {
    $this->_printArea = NULL;
  }
  else {
    $printAreas = explode(',', $this->_printArea);
    if (isset($printAreas[$index - 1])) {
      unset($printAreas[$index - 1]);
      $this->_printArea = implode(',', $printAreas);
    }
  }
  return $this;
}