Beispiel #1
0
 /**
  * Create a new worksheet
  *
  * @param PHPExcel 		$pParent
  * @param string 		$pTitle
  */
 public function __construct(PHPExcel $pParent = null, $pTitle = 'Worksheet')
 {
     // Set parent and title
     $this->_parent = $pParent;
     $this->setTitle($pTitle);
     $this->setSheetState(Worksheet::SHEETSTATE_VISIBLE);
     $this->_cellCollection = CachedObjectStorageFactory::getInstance($this);
     // Set page setup
     $this->_pageSetup = new Worksheet_PageSetup();
     // Set page margins
     $this->_pageMargins = new Worksheet_PageMargins();
     // Set page header/footer
     $this->_headerFooter = new Worksheet_HeaderFooter();
     // Set sheet view
     $this->_sheetView = new Worksheet_SheetView();
     // Drawing collection
     $this->_drawingCollection = new ArrayObject();
     // Protection
     $this->_protection = new Worksheet_Protection();
     // Gridlines
     $this->_showGridlines = true;
     $this->_printGridlines = false;
     // Outline summary
     $this->_showSummaryBelow = true;
     $this->_showSummaryRight = true;
     // Default row dimension
     $this->_defaultRowDimension = new Worksheet_RowDimension(null);
     // Default column dimension
     $this->_defaultColumnDimension = new Worksheet_ColumnDimension(null);
 }
Beispiel #2
0
 /**
  * Create a new worksheet
  *
  * @param PHPExcel        $pParent
  * @param string        $pTitle
  */
 public function __construct(Spreadsheet $parent = null, $pTitle = 'Worksheet')
 {
     // Set parent and title
     $this->parent = $parent;
     $this->setTitle($pTitle, false);
     // setTitle can change $pTitle
     $this->setCodeName($this->getTitle());
     $this->setSheetState(Worksheet::SHEETSTATE_VISIBLE);
     $this->cellCollection = CachedObjectStorageFactory::getInstance($this);
     // Set page setup
     $this->pageSetup = new Worksheet\PageSetup();
     // Set page margins
     $this->pageMargins = new Worksheet\PageMargins();
     // Set page header/footer
     $this->headerFooter = new Worksheet\HeaderFooter();
     // Set sheet view
     $this->sheetView = new Worksheet\SheetView();
     // Drawing collection
     $this->drawingCollection = new \ArrayObject();
     // Chart collection
     $this->chartCollection = new \ArrayObject();
     // Protection
     $this->protection = new Worksheet\Protection();
     // Default row dimension
     $this->defaultRowDimension = new Worksheet\RowDimension(null);
     // Default column dimension
     $this->defaultColumnDimension = new Worksheet\ColumnDimension(null);
     $this->autoFilter = new Worksheet\AutoFilter(null, $this);
 }