You are here

private function PHPExcel_Writer_Excel5_Worksheet::_writeZoom in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Worksheet.php \PHPExcel_Writer_Excel5_Worksheet::_writeZoom()

* Store the window zoom factor. This should be a reduced fraction but for * simplicity we will store all fractions with a numerator of 100.

1 call to PHPExcel_Writer_Excel5_Worksheet::_writeZoom()
PHPExcel_Writer_Excel5_Worksheet::close in vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Worksheet.php
* Add data to the beginning of the workbook (note the reverse order) * and to the end of the workbook. * * @access public *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Worksheet.php, line 2695

Class

PHPExcel_Writer_Excel5_Worksheet
PHPExcel_Writer_Excel5_Worksheet

Code

private function _writeZoom() {

  // If scale is 100 we don't need to write a record
  if ($this->_phpSheet
    ->getSheetView()
    ->getZoomScale() == 100) {
    return;
  }
  $record = 0xa0;

  // Record identifier
  $length = 0x4;

  // Bytes to follow
  $header = pack("vv", $record, $length);
  $data = pack("vv", $this->_phpSheet
    ->getSheetView()
    ->getZoomScale(), 100);
  $this
    ->_append($header . $data);
}