当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPExcel_Shared_OLE::LocalDate2OLE方法代码示例

本文整理汇总了PHP中PHPExcel_Shared_OLE::LocalDate2OLE方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPExcel_Shared_OLE::LocalDate2OLE方法的具体用法?PHP PHPExcel_Shared_OLE::LocalDate2OLE怎么用?PHP PHPExcel_Shared_OLE::LocalDate2OLE使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPExcel_Shared_OLE的用法示例。


在下文中一共展示了PHPExcel_Shared_OLE::LocalDate2OLE方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _getPpsWk

 /**
  * Returns a string with the PPS's WK (What is a WK?)
  *
  * @access public
  * @return string The binary string
  */
 public function _getPpsWk()
 {
     $ret = str_pad($this->Name, 64, "");
     $ret .= pack("v", strlen($this->Name) + 2) . pack("c", $this->Type) . pack("c", 0x0) . pack("V", $this->PrevPps) . pack("V", $this->NextPps) . pack("V", $this->DirPps) . "\t" . "" . "À" . "F" . "" . PHPExcel_Shared_OLE::LocalDate2OLE($this->Time1st) . PHPExcel_Shared_OLE::LocalDate2OLE($this->Time2nd) . pack("V", isset($this->_StartBlock) ? $this->_StartBlock : 0) . pack("V", $this->Size) . pack("V", 0);
     // 128
     return $ret;
 }
开发者ID:blindest,项目名称:Yii-CMS-2.0,代码行数:13,代码来源:PPS.php

示例2: _getPpsWk

	/**
	* Returns a string with the PPS's WK (What is a WK?)
	*
	* @access public
	* @return string The binary string
	*/
	public function _getPpsWk()
	{
		$ret = str_pad($this->Name,64,"\x00");

		$ret .= pack("v", strlen($this->Name) + 2)  // 66
			  . pack("c", $this->Type)              // 67
			  . pack("c", 0x00) //UK                // 68
			  . pack("V", $this->PrevPps) //Prev    // 72
			  . pack("V", $this->NextPps) //Next    // 76
			  . pack("V", $this->DirPps)  //Dir     // 80
			  . "\x00\x09\x02\x00"                  // 84
			  . "\x00\x00\x00\x00"                  // 88
			  . "\xc0\x00\x00\x00"                  // 92
			  . "\x00\x00\x00\x46"                  // 96 // Seems to be ok only for Root
			  . "\x00\x00\x00\x00"                  // 100
			  . PHPExcel_Shared_OLE::LocalDate2OLE($this->Time1st)       // 108
			  . PHPExcel_Shared_OLE::LocalDate2OLE($this->Time2nd)       // 116
			  . pack("V", isset($this->_StartBlock)?
						$this->_StartBlock:0)        // 120
			  . pack("V", $this->Size)               // 124
			  . pack("V", 0);                        // 128
		return $ret;
	}
开发者ID:remyyounes,项目名称:dolibarr,代码行数:29,代码来源:PPS.php

示例3: _writeSummaryInformation

 /**
  * Build the OLE Part for Summary Information
  *
  * @return string
  */
 private function _writeSummaryInformation()
 {
     // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark)
     $data = pack('v', 0xfffe);
     // offset: 2; size: 2;
     $data .= pack('v', 0x0);
     // offset: 4; size: 2; OS version
     $data .= pack('v', 0x106);
     // offset: 6; size: 2; OS indicator
     $data .= pack('v', 0x2);
     // offset: 8; size: 16
     $data .= pack('VVVV', 0x0, 0x0, 0x0, 0x0);
     // offset: 24; size: 4; section count
     $data .= pack('V', 0x1);
     // offset: 28; size: 16; first section's class id: e0 85 9f f2 f9 4f 68 10 ab 91 08 00 2b 27 b3 d9
     $data .= pack('vvvvvvvv', 0x85e0, 0xf29f, 0x4ff9, 0x1068, 0x91ab, 0x8, 0x272b, 0xd9b3);
     // offset: 44; size: 4; offset of the start
     $data .= pack('V', 0x30);
     // SECTION
     $dataSection = array();
     $dataSection_NumProps = 0;
     $dataSection_Summary = '';
     $dataSection_Content = '';
     // CodePage : CP-1252
     $dataSection[] = array('summary' => array('pack' => 'V', 'data' => 0x1), 'offset' => array('pack' => 'V'), 'type' => array('pack' => 'V', 'data' => 0x2), 'data' => array('data' => 1252));
     $dataSection_NumProps++;
     //	Title
     if ($this->_phpExcel->getProperties()->getTitle()) {
         $dataProp = $this->_phpExcel->getProperties()->getTitle();
         $dataSection[] = array('summary' => array('pack' => 'V', 'data' => 0x2), 'offset' => array('pack' => 'V'), 'type' => array('pack' => 'V', 'data' => 0x1e), 'data' => array('data' => $dataProp, 'length' => strlen($dataProp)));
         $dataSection_NumProps++;
     }
     //	Subject
     if ($this->_phpExcel->getProperties()->getSubject()) {
         $dataProp = $this->_phpExcel->getProperties()->getSubject();
         $dataSection[] = array('summary' => array('pack' => 'V', 'data' => 0x3), 'offset' => array('pack' => 'V'), 'type' => array('pack' => 'V', 'data' => 0x1e), 'data' => array('data' => $dataProp, 'length' => strlen($dataProp)));
         $dataSection_NumProps++;
     }
     //	Author (Creator)
     if ($this->_phpExcel->getProperties()->getCreator()) {
         $dataProp = $this->_phpExcel->getProperties()->getCreator();
         $dataSection[] = array('summary' => array('pack' => 'V', 'data' => 0x4), 'offset' => array('pack' => 'V'), 'type' => array('pack' => 'V', 'data' => 0x1e), 'data' => array('data' => $dataProp, 'length' => strlen($dataProp)));
         $dataSection_NumProps++;
     }
     //	Keywords
     if ($this->_phpExcel->getProperties()->getKeywords()) {
         $dataProp = $this->_phpExcel->getProperties()->getKeywords();
         $dataSection[] = array('summary' => array('pack' => 'V', 'data' => 0x5), 'offset' => array('pack' => 'V'), 'type' => array('pack' => 'V', 'data' => 0x1e), 'data' => array('data' => $dataProp, 'length' => strlen($dataProp)));
         $dataSection_NumProps++;
     }
     //	Comments (Description)
     if ($this->_phpExcel->getProperties()->getDescription()) {
         $dataProp = $this->_phpExcel->getProperties()->getDescription();
         $dataSection[] = array('summary' => array('pack' => 'V', 'data' => 0x6), 'offset' => array('pack' => 'V'), 'type' => array('pack' => 'V', 'data' => 0x1e), 'data' => array('data' => $dataProp, 'length' => strlen($dataProp)));
         $dataSection_NumProps++;
     }
     //	Last Saved By (LastModifiedBy)
     if ($this->_phpExcel->getProperties()->getLastModifiedBy()) {
         $dataProp = $this->_phpExcel->getProperties()->getLastModifiedBy();
         $dataSection[] = array('summary' => array('pack' => 'V', 'data' => 0x8), 'offset' => array('pack' => 'V'), 'type' => array('pack' => 'V', 'data' => 0x1e), 'data' => array('data' => $dataProp, 'length' => strlen($dataProp)));
         $dataSection_NumProps++;
     }
     //	Created Date/Time
     if ($this->_phpExcel->getProperties()->getCreated()) {
         $dataProp = $this->_phpExcel->getProperties()->getCreated();
         $dataSection[] = array('summary' => array('pack' => 'V', 'data' => 0xc), 'offset' => array('pack' => 'V'), 'type' => array('pack' => 'V', 'data' => 0x40), 'data' => array('data' => PHPExcel_Shared_OLE::LocalDate2OLE($dataProp)));
         $dataSection_NumProps++;
     }
     //	Modified Date/Time
     if ($this->_phpExcel->getProperties()->getModified()) {
         $dataProp = $this->_phpExcel->getProperties()->getModified();
         $dataSection[] = array('summary' => array('pack' => 'V', 'data' => 0xd), 'offset' => array('pack' => 'V'), 'type' => array('pack' => 'V', 'data' => 0x40), 'data' => array('data' => PHPExcel_Shared_OLE::LocalDate2OLE($dataProp)));
         $dataSection_NumProps++;
     }
     //	Security
     $dataSection[] = array('summary' => array('pack' => 'V', 'data' => 0x13), 'offset' => array('pack' => 'V'), 'type' => array('pack' => 'V', 'data' => 0x3), 'data' => array('data' => 0x0));
     $dataSection_NumProps++;
     // 		4 	Section Length
     //		4 	Property count
     //		8 * $dataSection_NumProps (8 =  ID (4) + OffSet(4))
     $dataSection_Content_Offset = 8 + $dataSection_NumProps * 8;
     foreach ($dataSection as $dataProp) {
         // Summary
         $dataSection_Summary .= pack($dataProp['summary']['pack'], $dataProp['summary']['data']);
         // Offset
         $dataSection_Summary .= pack($dataProp['offset']['pack'], $dataSection_Content_Offset);
         // DataType
         $dataSection_Content .= pack($dataProp['type']['pack'], $dataProp['type']['data']);
         // Data
         if ($dataProp['type']['data'] == 0x2) {
             // 2 byte signed integer
             $dataSection_Content .= pack('V', $dataProp['data']['data']);
             $dataSection_Content_Offset += 4 + 4;
         } elseif ($dataProp['type']['data'] == 0x3) {
             // 4 byte signed integer
//.........这里部分代码省略.........
开发者ID:TheTypoMaster,项目名称:SPHERE-Framework,代码行数:101,代码来源:Excel5.php

示例4: _getPpsWk

	/**
	 * Returns a string with the PPS's WK (What is a WK?)
	 *
	 * @access public
	 * @return string The binary string
	 */
	public function _getPpsWk() {
		$ret = str_pad ( $this->Name, 64, "\x00" );
		
		$ret .= pack ( "v", strlen ( $this->Name ) + 2 ) . 		// 66
		pack ( "c", $this->Type ) . 		// 67
		pack ( "c", 0x00 ) . 		// UK // 68
		pack ( "V", $this->PrevPps ) . 		// Prev // 72
		pack ( "V", $this->NextPps ) . 		// Next // 76
		pack ( "V", $this->DirPps ) . 		// Dir // 80
		"\x00\x09\x02\x00" . 		// 84
		"\x00\x00\x00\x00" . 		// 88
		"\xc0\x00\x00\x00" . 		// 92
		"\x00\x00\x00\x46" . 		// 96 // Seems to be ok only for Root
		"\x00\x00\x00\x00" . 		// 100
		PHPExcel_Shared_OLE::LocalDate2OLE ( $this->Time1st ) . 		// 108
		PHPExcel_Shared_OLE::LocalDate2OLE ( $this->Time2nd ) . 		// 116
		pack ( "V", isset ( $this->_StartBlock ) ? $this->_StartBlock : 0 ) . 		// 120
		pack ( "V", $this->Size ) . 		// 124
		pack ( "V", 0 ); // 128
		return $ret;
	}
开发者ID:nanpeixoto,项目名称:cide,代码行数:27,代码来源:PPS.php


注:本文中的PHPExcel_Shared_OLE::LocalDate2OLE方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。