private function createNewCell($pCoordinate)
    {
        $cell = new Cell(null, DataType::TYPE_NULL, $this);
        $this->cellCollection->add($pCoordinate, $cell);
        $this->cellCollectionIsSorted = false;

        // Coordinates
        $aCoordinates = Coordinate::coordinateFromString($pCoordinate);
        if (Coordinate::columnIndexFromString($this->cachedHighestColumn) < Coordinate::columnIndexFromString($aCoordinates[0])) {
            $this->cachedHighestColumn = $aCoordinates[0];
        }
        $this->cachedHighestRow = max($this->cachedHighestRow, $aCoordinates[1]);

        // Cell needs appropriate xfIndex from dimensions records
        //    but don't create dimension records if they don't already exist
        $rowDimension = $this->getRowDimension($aCoordinates[1], false);
        $columnDimension = $this->getColumnDimension($aCoordinates[0], false);

        if ($rowDimension !== null && $rowDimension->getXfIndex() > 0) {
            // then there is a row dimension with explicit style, assign it to the cell
            $cell->setXfIndex($rowDimension->getXfIndex());
        } elseif ($columnDimension !== null && $columnDimension->getXfIndex() > 0) {
            // then there is a column dimension, assign it to the cell
            $cell->setXfIndex($columnDimension->getXfIndex());
        }

        return $cell;
    }
private function createNewCell($pCoordinate)
    {
        $cell = new Cell(null, DataType::TYPE_NULL, $this);
        $this->cellCollection->add($pCoordinate, $cell);
        $this->cellCollectionIsSorted = false;

        // Coordinates
        $aCoordinates = Coordinate::coordinateFromString($pCoordinate);
        if (Coordinate::columnIndexFromString($this->cachedHighestColumn) < Coordinate::columnIndexFromString($aCoordinates[0])) {
            $this->cachedHighestColumn = $aCoordinates[0];
        }
        $this->cachedHighestRow = max($this->cachedHighestRow, $aCoordinates[1]);

        // Cell needs appropriate xfIndex from dimensions records
        //    but don't create dimension records if they don't already exist
        $rowDimension = $this->getRowDimension($aCoordinates[1], false);
        $columnDimension = $this->getColumnDimension($aCoordinates[0], false);

        if ($rowDimension !== null && $rowDimension->getXfIndex() > 0) {
            // then there is a row dimension with explicit style, assign it to the cell
            $cell->setXfIndex($rowDimension->getXfIndex());
        } elseif ($columnDimension !== null && $columnDimension->getXfIndex() > 0) {
            // then there is a column dimension, assign it to the cell
            $cell->setXfIndex($columnDimension->getXfIndex());
        }

        return $cell;
    }
private function createNewCell ( $ pCoordinate ) { $ cell = new Cell ( null , DataType :: TYPE_NULL , $ this ) ; $ this -> cellCollection -> add ( $ pCoordinate , $ cell ) ; $ this -> cellCollectionIsSorted = false ; // Coordinates $ aCoordinates = Coordinate :: coordinateFromString ( $ pCoordinate ) ; if ( Coordinate :: columnIndexFromString ( $ this -> cachedHighestColumn ) < Coordinate :: columnIndexFromString ( $ aCoordinates [ 0 ] ) ) { $ this -> cachedHighestColumn = $ aCoordinates [ 0 ] ; } $ this -> cachedHighestRow = max ( $ this -> cachedHighestRow , $ aCoordinates [ 1 ] ) ; // Cell needs appropriate xfIndex from dimensions records //    but don't create dimension records if they don't already exist $ rowDimension = $ this -> getRowDimension ( $ aCoordinates [ 1 ] , false ) ; $ columnDimension = $ this -> getColumnDimension ( $ aCoordinates [ 0 ] , false ) ; if ( $ rowDimension !== null && $ rowDimension -> getXfIndex ( ) > 0 ) { // then there is a row dimension with explicit style, assign it to the cell $ cell -> setXfIndex ( $ rowDimension -> getXfIndex ( ) ) ; } elseif ( $ columnDimension !== null && $ columnDimension -> getXfIndex ( ) > 0 ) { // then there is a column dimension, assign it to the cell $ cell -> setXfIndex ( $ columnDimension -> getXfIndex ( ) ) ; } return $ cell ; }
Create a new cell at the specified coordinate.

@param string $pCoordinate Coordinate of the cell

@return Cell Cell that was created
Create a new cell at the specified coordinate .