You are here

public function PHPExcel::__construct in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel.php \PHPExcel::__construct()

* Create a new PHPExcel with one Worksheet

File

vendor/phpoffice/phpexcel/Classes/PHPExcel.php, line 357

Class

PHPExcel
PHPExcel

Code

public function __construct() {
  $this->_uniqueID = uniqid();
  $this->_calculationEngine = PHPExcel_Calculation::getInstance($this);

  // Initialise worksheet collection and add one worksheet
  $this->_workSheetCollection = array();
  $this->_workSheetCollection[] = new PHPExcel_Worksheet($this);
  $this->_activeSheetIndex = 0;

  // Create document properties
  $this->_properties = new PHPExcel_DocumentProperties();

  // Create document security
  $this->_security = new PHPExcel_DocumentSecurity();

  // Set named ranges
  $this->_namedRanges = array();

  // Create the cellXf supervisor
  $this->_cellXfSupervisor = new PHPExcel_Style(true);
  $this->_cellXfSupervisor
    ->bindParent($this);

  // Create the default style
  $this
    ->addCellXf(new PHPExcel_Style());
  $this
    ->addCellStyleXf(new PHPExcel_Style());
}