You are here

private function PHPExcel_Writer_Excel5_Worksheet::_writeProtect 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::_writeProtect()

* Set the Biff PROTECT record to indicate that the worksheet is protected.

1 call to PHPExcel_Writer_Excel5_Worksheet::_writeProtect()
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 2267

Class

PHPExcel_Writer_Excel5_Worksheet
PHPExcel_Writer_Excel5_Worksheet

Code

private function _writeProtect() {

  // Exit unless sheet protection has been specified
  if (!$this->_phpSheet
    ->getProtection()
    ->getSheet()) {
    return;
  }
  $record = 0x12;

  // Record identifier
  $length = 0x2;

  // Bytes to follow
  $fLock = 1;

  // Worksheet is protected
  $header = pack("vv", $record, $length);
  $data = pack("v", $fLock);
  $this
    ->_append($header . $data);
}