You are here

public function PHPExcel_Worksheet_SheetView::setZoomScale in Loft Data Grids 7.2

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

* Set ZoomScale * * Valid values range from 10 to 400. * *

Parameters

int $pValue: * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_SheetView

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/SheetView.php, line 102

Class

PHPExcel_Worksheet_SheetView
PHPExcel_Worksheet_SheetView

Code

public function setZoomScale($pValue = 100) {

  // Microsoft Office Excel 2007 only allows setting a scale between 10 and 400 via the user interface,
  // but it is apparently still able to handle any scale >= 1
  if ($pValue >= 1 || is_null($pValue)) {
    $this->_zoomScale = $pValue;
  }
  else {
    throw new PHPExcel_Exception("Scale must be greater than or equal to 1.");
  }
  return $this;
}