private function _writeRangeProtection()
	{
		foreach ($this->_phpSheet->getProtectedCells() as $range => $password) {
			// number of ranges, e.g. 'A1:B3 C20:D25'
			$cellRanges = explode(' ', $range);
			$cref = count($cellRanges);

			$recordData = pack(
				'vvVVvCVvVv',
				0x0868,
				0x00,
				0x0000,
				0x0000,
				0x02,
				0x0,
				0x0000,
				$cref,
				0x0000,
				0x00
			);

			foreach ($cellRanges as $cellRange) {
				$recordData .= $this->_writeBIFF8CellRangeAddressFixed($cellRange);
			}

			// the rgbFeat structure
			$recordData .= pack(
				'VV',
				0x0000,
				hexdec($password)
			);

			$recordData .= PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong('p' . md5($recordData));

			$length = strlen($recordData);

			$record = 0x0868;		// Record identifier
			$header = pack("vv", $record, $length);
			$this->_append($header . $recordData);
		}
	}
private function _writeRangeProtection()
	{
		foreach ($this->_phpSheet->getProtectedCells() as $range => $password) {
			// number of ranges, e.g. 'A1:B3 C20:D25'
			$cellRanges = explode(' ', $range);
			$cref = count($cellRanges);

			$recordData = pack(
				'vvVVvCVvVv',
				0x0868,
				0x00,
				0x0000,
				0x0000,
				0x02,
				0x0,
				0x0000,
				$cref,
				0x0000,
				0x00
			);

			foreach ($cellRanges as $cellRange) {
				$recordData .= $this->_writeBIFF8CellRangeAddressFixed($cellRange);
			}

			// the rgbFeat structure
			$recordData .= pack(
				'VV',
				0x0000,
				hexdec($password)
			);

			$recordData .= PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong('p' . md5($recordData));

			$length = strlen($recordData);

			$record = 0x0868;		// Record identifier
			$header = pack("vv", $record, $length);
			$this->_append($header . $recordData);
		}
	}
private function _writeRangeProtection ( ) { foreach ( $ this -> _phpSheet -> getProtectedCells ( ) as $ range => $ password ) { // number of ranges, e.g. 'A1:B3 C20:D25' $ cellRanges = explode ( ' ' , $ range ) ; $ cref = count ( $ cellRanges ) ; $ recordData = pack ( 'vvVVvCVvVv' , 0x0868 , 0x00 , 0x0000 , 0x0000 , 0x02 , 0x0 , 0x0000 , $ cref , 0x0000 , 0x00 ) ; foreach ( $ cellRanges as $ cellRange ) { $ recordData .= $ this -> _writeBIFF8CellRangeAddressFixed ( $ cellRange ) ; } // the rgbFeat structure $ recordData .= pack ( 'VV' , 0x0000 , hexdec ( $ password ) ) ; $ recordData .= PHPExcel_Shared_String :: UTF8toBIFF8UnicodeLong ( 'p' . md5 ( $ recordData ) ) ; $ length = strlen ( $ recordData ) ; $ record = 0x0868 ; // Record identifier $ header = pack ( "vv" , $ record , $ length ) ; $ this -> _append ( $ header . $ recordData ) ; } }
Write BIFF record RANGEPROTECTION

Openoffice.org's Documentaion of the Microsoft Excel File Format uses term RANGEPROTECTION for these records
Microsoft Office Excel 97-2007 Binary File Format Specification uses term FEAT for these records
Write BIFF record RANGEPROTECTION