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


PHP PHPExcel_Worksheet::setShowGridlines方法代码示例

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


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

示例1: hide_screen_gridlines

 /**
  * Set the option to hide gridlines on the worksheet (as seen on the screen).
  */
 public function hide_screen_gridlines()
 {
     $this->worksheet->setShowGridlines(false);
 }
开发者ID:Gavinthisisit,项目名称:Moodle,代码行数:7,代码来源:excellib.class.php

示例2: _readWindow2

 /**
  * Read WINDOW2 record
  */
 private function _readWindow2()
 {
     $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;
     // offset: 0; size: 2; option flags
     $options = self::_GetInt2d($recordData, 0);
     // offset: 2; size: 2; index to first visible row
     $firstVisibleRow = self::_GetInt2d($recordData, 2);
     // offset: 4; size: 2; index to first visible colum
     $firstVisibleColumn = self::_GetInt2d($recordData, 4);
     if ($this->_version === self::XLS_BIFF8) {
         // offset:  8; size: 2; not used
         // offset: 10; size: 2; cached magnification factor in page break preview (in percent); 0 = Default (60%)
         // offset: 12; size: 2; cached magnification factor in normal view (in percent); 0 = Default (100%)
         // offset: 14; size: 4; not used
         $zoomscaleInPageBreakPreview = self::_GetInt2d($recordData, 10);
         if ($zoomscaleInPageBreakPreview === 0) {
             $zoomscaleInPageBreakPreview = 60;
         }
         $zoomscaleInNormalView = self::_GetInt2d($recordData, 12);
         if ($zoomscaleInNormalView === 0) {
             $zoomscaleInNormalView = 100;
         }
     }
     // bit: 1; mask: 0x0002; 0 = do not show gridlines, 1 = show gridlines
     $showGridlines = (bool) ((0x2 & $options) >> 1);
     $this->_phpSheet->setShowGridlines($showGridlines);
     // bit: 2; mask: 0x0004; 0 = do not show headers, 1 = show headers
     $showRowColHeaders = (bool) ((0x4 & $options) >> 2);
     $this->_phpSheet->setShowRowColHeaders($showRowColHeaders);
     // bit: 3; mask: 0x0008; 0 = panes are not frozen, 1 = panes are frozen
     $this->_frozen = (bool) ((0x8 & $options) >> 3);
     // bit: 6; mask: 0x0040; 0 = columns from left to right, 1 = columns from right to left
     $this->_phpSheet->setRightToLeft((bool) ((0x40 & $options) >> 6));
     // bit: 10; mask: 0x0400; 0 = sheet not active, 1 = sheet active
     $isActive = (bool) ((0x400 & $options) >> 10);
     if ($isActive) {
         $this->_phpExcel->setActiveSheetIndex($this->_phpExcel->getIndex($this->_phpSheet));
     }
     // bit: 11; mask: 0x0800; 0 = normal view, 1 = page break view
     $isPageBreakPreview = (bool) ((0x800 & $options) >> 11);
     //FIXME: set $firstVisibleRow and $firstVisibleColumn
     if ($this->_phpSheet->getSheetView()->getView() !== PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_LAYOUT) {
         //NOTE: this setting is inferior to page layout view(Excel2007-)
         $view = $isPageBreakPreview ? PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW : PHPExcel_Worksheet_SheetView::SHEETVIEW_NORMAL;
         $this->_phpSheet->getSheetView()->setView($view);
         if ($this->_version === self::XLS_BIFF8) {
             $zoomScale = $isPageBreakPreview ? $zoomscaleInPageBreakPreview : $zoomscaleInNormalView;
             $this->_phpSheet->getSheetView()->setZoomScale($zoomScale);
             $this->_phpSheet->getSheetView()->setZoomScaleNormal($zoomscaleInNormalView);
         }
     }
 }
开发者ID:h3len,项目名称:Project,代码行数:58,代码来源:Excel5.php

示例3: _readWindow2

 /**
  * Read WINDOW2 record
  */
 private function _readWindow2()
 {
     $pos = $this->_pos;
     $length = $this->_GetInt2d($this->_data, $pos + 2);
     $recordData = substr($this->_data, $pos + 4, $length);
     $pos += 4;
     // offset: 0; size: 2; option flags
     $options = $this->_GetInt2d($recordData, 0);
     // bit: 1; mask: 0x0002; 0 = do not show gridlines, 1 = show gridlines
     $showGridlines = (bool) ((0x2 & $options) >> 1);
     $this->_phpSheet->setShowGridlines($showGridlines);
     // bit: 3; mask: 0x0008; 0 = panes are not frozen, 1 = panes are frozen
     $this->_frozen = (bool) ((0x8 & $options) >> 3);
     // bit: 10; mask: 0x0400; 0 = sheet not active, 1 = sheet active
     $isActive = (bool) ((0x400 & $options) >> 10);
     if ($isActive) {
         $this->_phpExcel->setActiveSheetIndex($this->_phpExcel->getIndex($this->_phpSheet));
     }
     // move stream pointer to next record
     $this->_pos += 4 + $length;
 }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:24,代码来源:Excel5.php

示例4: _readLabelSst

	 * This record represents a cell that contains a string. It
	 * replaces the LABEL record and RSTRING record used in
	 * BIFF2-BIFF5.
	 *
	 * --	"OpenOffice.org's Documentation of the Microsoft
	 * 		Excel File Format"
	 */
    private function _readLabelSst()
    {
        $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;
        // offset: 0; size: 2; index to row
        $row = self::_GetInt2d($recordData, 0);
        // offset: 2; size: 2; index to column
        $column = self::_GetInt2d($recordData, 2);
        $columnString = PHPExcel_Cell::stringFromColumnIndex($column);
        // Read cell?
        if (!is_null($this->getReadFilter()) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->_phpSheet->getTitle())) {
            // offset: 4; size: 2; index to XF record
            $xfIndex = self::_GetInt2d($recordData, 4);
            // offset: 6; size: 4; index to SST record
            $index = self::_GetInt4d($recordData, 6);
            // add cell
开发者ID:Arikito,项目名称:webking.xt,代码行数:25,代码来源:Excel5.php


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