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


PHP PHPExcel_Worksheet::getTabColor方法代码示例

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


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

示例1: _writeSheetLayout

 /**
  * Write SHEETLAYOUT record
  */
 private function _writeSheetLayout()
 {
     if (!$this->_phpSheet->isTabColorSet()) {
         return;
     }
     $recordData = pack('vvVVVvv', 0x862, 0x0, 0x0, 0x0, 0x14, $this->_colors[$this->_phpSheet->getTabColor()->getRGB()], 0x0);
     $length = strlen($recordData);
     $record = 0x862;
     // Record identifier
     $header = pack('vv', $record, $length);
     $this->_append($header . $recordData);
 }
开发者ID:ljhchshm,项目名称:weixin,代码行数:15,代码来源:Worksheet.php

示例2: _writeSheetPr

 /**
  * Write SheetPr
  *
  * @param	PHPExcel_Shared_XMLWriter		$objWriter		XML Writer
  * @param	PHPExcel_Worksheet				$pSheet			Worksheet
  * @throws	Exception
  */
 private function _writeSheetPr(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
 {
     // sheetPr
     $objWriter->startElement('sheetPr');
     //$objWriter->writeAttribute('codeName',		$pSheet->getTitle());
     // tabColor
     if ($pSheet->isTabColorSet()) {
         $objWriter->startElement('tabColor');
         $objWriter->writeAttribute('rgb', $pSheet->getTabColor()->getARGB());
         $objWriter->endElement();
     }
     // outlinePr
     $objWriter->startElement('outlinePr');
     $objWriter->writeAttribute('summaryBelow', $pSheet->getShowSummaryBelow() ? '1' : '0');
     $objWriter->writeAttribute('summaryRight', $pSheet->getShowSummaryRight() ? '1' : '0');
     $objWriter->endElement();
     // pageSetUpPr
     if ($pSheet->getPageSetup()->getFitToPage()) {
         $objWriter->startElement('pageSetUpPr');
         $objWriter->writeAttribute('fitToPage', '1');
         $objWriter->endElement();
     }
     $objWriter->endElement();
 }
开发者ID:honj51,项目名称:taobaocrm,代码行数:31,代码来源:Worksheet.php

示例3: _writeSheetPr

 /**
  * Write SheetPr
  *
  * @param	PHPExcel_Shared_XMLWriter		$objWriter		XML Writer
  * @param	PHPExcel_Worksheet				$pSheet			Worksheet
  * @throws	PHPExcel_Writer_Exception
  */
 private function _writeSheetPr(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
 {
     // sheetPr
     $objWriter->startElement('sheetPr');
     //$objWriter->writeAttribute('codeName',		$pSheet->getTitle());
     if ($pSheet->getParent()->hasMacros()) {
         //if the workbook have macros, we need to have codeName for the sheet
         if ($pSheet->hasCodeName() == false) {
             $pSheet->setCodeName($pSheet->getTitle());
         }
         $objWriter->writeAttribute('codeName', $pSheet->getCodeName());
     }
     $autoFilterRange = $pSheet->getAutoFilter()->getRange();
     if (!empty($autoFilterRange)) {
         $objWriter->writeAttribute('filterMode', 1);
         $pSheet->getAutoFilter()->showHideRows();
     }
     // tabColor
     if ($pSheet->isTabColorSet()) {
         $objWriter->startElement('tabColor');
         $objWriter->writeAttribute('rgb', $pSheet->getTabColor()->getARGB());
         $objWriter->endElement();
     }
     // outlinePr
     $objWriter->startElement('outlinePr');
     $objWriter->writeAttribute('summaryBelow', $pSheet->getShowSummaryBelow() ? '1' : '0');
     $objWriter->writeAttribute('summaryRight', $pSheet->getShowSummaryRight() ? '1' : '0');
     $objWriter->endElement();
     // pageSetUpPr
     if ($pSheet->getPageSetup()->getFitToPage()) {
         $objWriter->startElement('pageSetUpPr');
         $objWriter->writeAttribute('fitToPage', '1');
         $objWriter->endElement();
     }
     $objWriter->endElement();
 }
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:43,代码来源:Worksheet.php

示例4: _writeSheetLayout

	/**
	 * Write SHEETLAYOUT record
	 */
	private function _writeSheetLayout() {
		if (! $this->_phpSheet->isTabColorSet ()) {
			return;
		}
		
		$recordData = pack ( 'vvVVVvv', 0x0862, 0x0000, 		// unused
		0x00000000, 		// unused
		0x00000000, 		// unused
		0x00000014, 		// size of record data
		$this->_colors [$this->_phpSheet->getTabColor ()->getRGB ()], 		// color index
		0x0000 )		// unused
		;
		
		$length = strlen ( $recordData );
		
		$record = 0x0862; // Record identifier
		$header = pack ( 'vv', $record, $length );
		$this->_append ( $header . $recordData );
	}
开发者ID:nanpeixoto,项目名称:cide,代码行数:22,代码来源:Worksheet.php

示例5: setWorksheetProperties

/**
 * Set the properties of a worksheet
 *
 * @param PHPExcel_Worksheet $worksheet
 * @param string $WSKind kind of worksheet
 * @param array $DProps array with the document properties
 * @param string $thisDate timestamp of the execution of the script
 */
function setWorksheetProperties($worksheet, $wsKind, $DProps, $thisDate)
{
    $worksheet->SetTitle($wsKind . ' ' . $thisDate);
    $worksheet->getTabColor()->setRGB($DProps[$wsKind]['FillColor']);
    // Set the printout options
    switch ($DProps[$wsKind]['PageSize']) {
        case 'A4':
            $page_size = PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4;
            break;
        case 'A3':
            $page_size = PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3;
            break;
        case 'Letter':
            $page_size = PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER;
            break;
        case 'Legal':
            $page_size = PHPExcel_Worksheet_PageSetup::PAPERSIZE_LEGAL;
            break;
        default:
            $page_size = PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4;
            break;
    }
    // Set orientation, fit to page width, paper size and page number to 1
    $worksheet->getPageSetup()->setOrientation($DProps[$wsKind]['Orientation'])->setFitToPage(true)->setFitToWidth(1)->setFitToHeight(0)->setPaperSize($page_size)->setFirstPageNumber(1);
    // Set title of header and page number footer for printout
    $worksheet->getHeaderFooter()->setOddHeader($DProps[$wsKind]['Title'])->setEvenHeader($DProps[$wsKind]['Title'])->setOddFooter('&RPage &P of &N')->setEvenFooter('&RPage &P of &N');
    // Set repeating header for most worksheets on the printout
    switch ($wsKind) {
        case 'Front Page':
            break;
        case 'DC Stats':
        case 'Rack Inventory':
        case 'DC Inventory':
            $worksheet->getPageSetup()->setRowsToRepeatAtTopByStartAndEnd(1, 1);
            break;
    }
}
开发者ID:dc-admin,项目名称:openDCIM,代码行数:45,代码来源:report_asset_Excel-new.php

示例6: _readObj

        $splicedRecordData = $this->_getSplicedRecordData();
        $recordData = $splicedRecordData['recordData'];
        $this->_drawingData .= $recordData;
    }
    /**
	 * Read OBJ record
	 */
    private function _readObj()
    {
        $length = self::_GetInt2d($this->_data, $this->_pos + 2);
        $recordData = substr($this->_data, $this->_pos + 4, $length);
        // move stream pointer to next record
        $this->_pos += 4 + $length;
        if ($this->_readDataOnly || $this->_version != self::XLS_BIFF8) {
            return;
        }
        // recordData consists of an array of subrecords looking like this:
        //	ft: 2 bytes; ftCmo type (0x15)
        //	cb: 2 bytes; size in bytes of ftCmo data
        //	ot: 2 bytes; Object Type
        //	id: 2 bytes; Object id number
        //	grbit: 2 bytes; Option Flags
        //	data: var; subrecord data
        // for now, we are just interested in the second subrecord containing the object type
        $ftCmoType = self::_GetInt2d($recordData, 0);
        $cbCmoSize = self::_GetInt2d($recordData, 2);
        $otObjType = self::_GetInt2d($recordData, 4);
        $idObjID = self::_GetInt2d($recordData, 6);
        $grbitOpts = self::_GetInt2d($recordData, 6);
开发者ID:Arikito,项目名称:webking.xt,代码行数:29,代码来源:Excel5.php


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