Set value in a cell
@param int     $cell   cell position (x start in 0)
@param int     $row    row position (Y start en 1)
@param string  $value  value to set
@param boolean $border active/inactive cell borders
@return  Excel
343358
public function setValue($cell, $row, $value, $border=false){
        $this->engine->getActiveSheet()->setCellValueByColumnAndRow($cell, $row, $value);
        $this->x = $this->getColumnName($cell);
        $this->y = $row;
        if($border){
            $this->engine->getActiveSheet()->getStyle("{$this->x}{$this->y}")->applyFromArray($this->style);
        }
        return $this;
    }
609777
public function setValue($value, $data = null)
    {
        // Save raw value for later validation
        $this->rawValue = $value;

        // Null case
        if (!$value) {
            $this->value = null;
            return $this;
        }

        // Re-run through formatter to tidy up (e.g. remove time component)
        $this->value = $this->tidyInternal($value);
        return $this;
    }
428909
public function merge($cell, $row, $numCell, $border=false){
        $style = array(
            'alignment' => array(
                'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,)
        );
        $from = $this->getColumnName($cell) . $row;
        $to =  $this->getColumnName(($cell+$numCell - 1)) . $row;
        $this->engine->getActiveSheet()->mergeCells("$from:$to");
        $this->engine->getActiveSheet()->getStyle("$from:$to")
             ->applyFromArray($style);
        if($border){
            $this->engine->getActiveSheet()->getStyle("$from:$to")
                ->applyFromArray($this->style);
        }
        return $this;
    }
49349
public function applyRowBorderToCell()
    {
        if (isset($this->row_styles["border-width"]) && $this->row_styles["border-width"]) {
            $cellstyle = $this->cell_styles["border-width"];
            if (!$cellstyle) {
                $cellstyle = $this->allcell_styles["border-width"];
            }
            $rowstyle = $this->row_styles["border-width"];
            if (!strstr($cellstyle, "T") && strstr($rowstyle, "T")) {
                $cellstyle .= "T";
            }

            if (!strstr($cellstyle, "B") && strstr($rowstyle, "B")) {
                $cellstyle .= "B";
            }

            if ($this->no_columns_printed == 1) {
                if (!strstr($cellstyle, "L") && strstr($rowstyle, "L")) {
                    $cellstyle .= "L";
                }

            }
            if ($this->no_columns_printed == $this->no_columns_to_print) {
                if (!strstr($cellstyle, "R") && strstr($rowstyle, "R")) {
                    $cellstyle .= "R";
                }

            }
            end($this->stylestack["border-width"]);
            $this->stylestack["border-width"][key($this->stylestack["border-width"])] = $cellstyle;
        }
    }
1277628
public function seek($row = 1)
    {
        if (($row < $this->startRow) || ($row > $this->endRow)) {
            throw new PHPExcel_Exception("Row $row is out of range ({$this->startRow} - {$this->endRow})");
        }
        $this->position = $row;

        return $this;
    }
695837
public function setColumn($column, $value)
    {
        // Iterate through the objects.
        foreach ($this->data as $data) {
            // Set the property.
            $data->$column = $value;
        }

        return $this;
    }
1188946
public function setWorksheet(PHPExcel_Worksheet $value = null)
    {
        if ($value !== null) {
            $this->worksheet = $value;
        }
        return $this;
    }
746097
public function setValue($value, $data = null)
    {
        // Define Value Property:
        
        $this->value = $value;
        
        // Determine Value Type:
        
        if (is_array($value)) {
            
            // Define from Array:
            
            foreach ($this->getViewports() as $viewport) {
                
                $field = $this->getViewportField($viewport);
                
                if (isset($value[$viewport])) {
                    $field->setValue($value[$viewport]);
                }
                
            }
            
        } elseif ($value instanceof DBViewports) {
            
            // Define from Field:
            
            foreach ($this->getViewports() as $viewport) {
                $this->getViewportField($viewport)->setValue($value->{$viewport});
            }
            
        }
        
        // Answer Receiver:
        
        return $this;
    }
646712
public function set(string $column, $value)
    {
        if (method_exists($this, $this->getAttributeSetMethod($column))) {
            foreach ($this as $row) {
                $row[$column] = $value;
            }

            return $this;
        }

        $this->validateFillableColumn($column);

        foreach (array_keys($this->rows) as $key) {
            $this->setInRow($key, $column, $value);
        }
        unset($row);

        return $this;
    }
624407
private function setCellValue($column, $value)
    {
        $cellValue = $value;

        if (\is_bool($value)) {
            if ($value) {
                $cellValue = 1;
            } else {
                $cellValue = 0;
            }
        }

        $this->getActiveSheet()->setCellValue($column, $cellValue);
    }
171685
public void setElement (int row, int col, float value) {
        switch (col) {
        case 0:
            switch (row) {
            case 0: m00 = value; return;
            case 1: m01 = value; return;
            case 2: m02 = value; return;
            }
            break;
        case 1:
            switch (row) {
            case 0: m10 = value; return;
            case 1: m11 = value; return;
            case 2: m12 = value; return;
            }
            break;
        case 2:
            switch (row) {
            case 0: m20 = value; return;
            case 1: m21 = value; return;
            case 2: m22 = value; return;
            }
            break;
        }
        throw new ArrayIndexOutOfBoundsException();
    }
1228935
private void writeCell(Row row, int col, Object value, CellStyle style) {
		Cell cell = row.createCell(col);
		cell.setCellValue(value != null ? value.toString() : "");
		cell.setCellStyle(style);
	}
225320
protected function row($name, $value) {
        if (is_bool($value)) $value = $value ? 'On' : 'Off';
        return
            $this->start('tr') . "\n" .
                $this->element('th', $name) . "\n" .
                $this->element('td', $value) . "\n" .
            $this->end('tr')
        ;
    }
896529
public function setValue($value)
    {
        switch (true) {
            case ($this instanceof Select):
                if (! is_array($value)) {
                    $value = (array) $value;
                }

                $this->value = $value;
                break;
            case ($this instanceof Textarea):
                $this->inner = $value;
                break;
            default:
                $this->attribute['value'] = $value;
                break;
        }

        return $this;
    }
919162
public static function setAutoSize($colAlphaStart=NULL, $colAlphaEnd=NULL, $value=true)
    {
        $sheetObj = self::validSheetObj();

        $colStart = ($colAlphaStart) ? self::alpha2num($colAlphaStart) : self::$_offsetCol + 1;
        $colEnd = ($colAlphaEnd) 
            ? self::alpha2num($colAlphaEnd) 
            : self::alpha2num($sheetObj->getHighestColumn());

        foreach (range($colStart,$colEnd ) as $key => $colNum) {
            $sheetObj->getColumnDimension(self::num2alpha($colNum))->setAutoSize($value);
        }

        return new static();
    }
1108209
public void newCell(final int row,
            final int column,
            final String value,
            final int mergedColStart) {
        if ( emptyCellValue( value ) ) {
            return;
        }
        final Integer rowInt = new Integer( row );
        if ( this._rowProperties.containsKey( rowInt ) ) {
            final String[] keyValue = (String[]) this._rowProperties.get( rowInt );
            if ( PropertiesSheetListener.EMPTY_STRING.equals( keyValue[1] ) ) {
                keyValue[1] = value;
                keyValue[2] = RuleSheetParserUtil.rc2name(row, column);
            }
        } else {
            final String trimmedValue = value.trim();
            final String[] keyValue = {trimmedValue, PropertiesSheetListener.EMPTY_STRING, RuleSheetParserUtil.rc2name(row, column+1) };
            this._rowProperties.put( rowInt, keyValue );
        }
    }
493007
public void setValueAt( int col, int row, double value ) {
        if (makeNew) {
            if (isInRaster(col, row)) {
                ((WritableRandomIter) iter).setSample(col, row, 0, value);
            } else {
                throw new RuntimeException("Setting value outside of raster.");
            }
        } else {
            throw new RuntimeException("Writing not allowed.");
        }
    }