Set Hyperlink

@param    PHPExcel_Cell_Hyperlink    $pHyperlink
@return    PHPExcel_Cell
@throws    PHPExcel_Exception
322771
public function setHyperlink(PHPExcel_Cell_Hyperlink $pHyperlink = null)
    {
        if (!isset($this->parent)) {
            throw new PHPExcel_Exception('Cannot set hyperlink for cell that is not bound to a worksheet');
        }

        $this->getWorksheet()->setHyperlink($this->getCoordinate(), $pHyperlink);

        return $this->notifyCacheController();
    }
1248764
public function setCell($col_index, $row_index, $val, $type=null)
    {

            $result = $this->xpath->query("//Row[@Index='".$row_index."']/Cell[@Index='".$col_index."']/Data", $this->active_worksheet);
            $data = $result->item(0);
            $type = $type ? $type : $this->getValueType($val);

            if($data){
                $data->setAttribute('ss:Type', $type);
                $data->firstChild->nodeValue = $val;
            } else {

            $result = $this->xpath->query("//Row[@Index='".$row_index."']");

            $row = $result->item(0);

            if(!$row){
                $row = $this->createElement('Row');
                $this->active_worksheet->table->appendChild($row);
                $row->setAttribute('Index', $row_index);
            }

            $result = $this->xpath->query("//Row[@Index='".$row_index."']/Cell[@Index='".$col_index."']", $row);
            $cell = $result->item(0);
            if(!$cell){
                $cell = $this->createElement('Cell');
                $row->appendChild($cell);
                $cell->setAttribute('Index', $col_index);
                $data = $this->createElement('Data');
                $cell->appendChild($data);
                $data->setAttribute('ss:Type', $type);
                $data->appendChild($this->createTextNode($val));
            } else {
                $data = $cell->getElementsByTagName('Data')->item(0);
                $data->setAttribute('ss:Type', $type);
                $data->firstChild->nodeValue = $val;
            }

            }
        return $data->parentNode;

    }
1188946
public function setWorksheet(PHPExcel_Worksheet $value = null)
    {
        if ($value !== null) {
            $this->worksheet = $value;
        }
        return $this;
    }
664655
public function addSheet(PHPExcel_Worksheet $pSheet, $iSheetIndex = null)
    {
        if ($this->sheetNameExists($pSheet->getTitle())) {
            throw new PHPExcel_Exception(
                "Workbook already contains a worksheet named '{$pSheet->getTitle()}'. Rename this worksheet first."
            );
        }

        if ($iSheetIndex === null) {
            if ($this->activeSheetIndex < 0) {
                $this->activeSheetIndex = 0;
            }
            $this->workSheetCollection[] = $pSheet;
        } else {
            // Insert the sheet at the requested index
            array_splice(
                $this->workSheetCollection,
                $iSheetIndex,
                0,
                array($pSheet)
            );

            // Adjust active sheet index if necessary
            if ($this->activeSheetIndex >= $iSheetIndex) {
                ++$this->activeSheetIndex;
            }
        }

        if ($pSheet->getParent() === null) {
            $pSheet->rebindParent($this);
        }

        return $pSheet;
    }
1306895
public function insertNewColumnBefore($pBefore = 'A', $pNumCols = 1)
    {
        if (!is_numeric($pBefore)) {
            $objReferenceHelper = PHPExcel_ReferenceHelper::getInstance();
            $objReferenceHelper->insertNewBefore($pBefore . '1', $pNumCols, 0, $this);
        } else {
            throw new PHPExcel_Exception("Column references should not be numeric.");
        }
        return $this;
    }
946779
public static function createWriter(PHPExcel $phpExcel, $writerType = '') {
		// Search type
		$searchType = 'IWriter';

		// Include class
		foreach (self::$_searchLocations as $searchLocation) {
			if ($searchLocation['type'] == $searchType) {
				$className = str_replace('{0}', $writerType, $searchLocation['class']);

				$instance = new $className($phpExcel);
				if ($instance !== NULL) {
					return $instance;
				}
			}
		}

		// Nothing found...
		throw new PHPExcel_Reader_Exception("No $searchType found for type $writerType");
	}
815138
protected function headerRow(PHPExcel_Worksheet &$sheet, array $fields, DataObjectInterface $do)
    {
        // Counter
        $row = 1;
        $col = 0;

        $useLabelsAsHeaders = $this->getUseLabelsAsHeaders();

        // Add each field to the first row
        foreach ($fields as $field => $type) {
            $header = $useLabelsAsHeaders ? $do->fieldLabel($field) : $field;
            $sheet->setCellValueByColumnAndRow($col, $row, $header);
            $col++;
        }

        // Get the last column
        $col--;
        $endcol = PHPExcel_Cell::stringFromColumnIndex($col);

        // Set Autofilters and Header row style
        $sheet->setAutoFilter("A1:{$endcol}1");
        $sheet->getStyle("A1:{$endcol}1")->getFont()->setBold(true);


        return $sheet;
    }
478920
public function insertNewColumnBeforeByIndex($pBefore = 0, $pNumCols = 1)
    {
        if ($pBefore >= 0) {
            return $this->insertNewColumnBefore(PHPExcel_Cell::stringFromColumnIndex($pBefore), $pNumCols);
        } else {
            throw new PHPExcel_Exception("Columns can only be inserted before at least column A (0).");
        }
    }
895898
public function addJsUrl(string $src, bool $defer = false, bool $prepend = false, array $attrs = null, 
			$target = self::TARGET_HEAD) {
		ArgUtils::valEnum($target, array(self::TARGET_HEAD, self::TARGET_BODY_START, self::TARGET_BODY_END));
		
		if ($target == self::TARGET_HEAD) {
			$target = self::HEAD_SCRIPT_KEY;
		}
		
		$attrs = (array) $attrs;
		if ($defer) {
			$attrs['defer'] = 'defer';
		}
		
		$htmlElement = new HtmlElement('script', HtmlUtils::mergeAttrs(
				array(/*'type' => 'text/javascript', */'src' => $src), $attrs), '');
		
		$this->htmlProperties->add($target, 'type:javascript:src:' . $src, $htmlElement, $prepend);
		
		return $this;
	}
667648
public function setModule($module)
        {
            if (null !== $module && !is_string($module)) {
                throw new Exception(
                    'Invalid argument: $module must be a string or null'
                );
            }

            $this->_module    = $module;
            $this->_hrefCache = null;

            return $this;
        }
333621
public function withHref($href)
    {
        /** @var EvolvableLinkInterface $that */
        $that = clone($this);
        $that->href = $href;

        $that->templated = ($this->hrefIsTemplated($href));

        return $that;
    }
1185701
public function getHyperlink()
    {
        if (!isset($this->parent)) {
            throw new PHPExcel_Exception('Cannot get hyperlink for cell that is not bound to a worksheet');
        }

        return $this->getWorksheet()->getHyperlink($this->getCoordinate());
    }
1241542
public function setActiveSheetIndexByName($pValue = '')
    {
        if (($worksheet = $this->getSheetByName($pValue)) instanceof PHPExcel_Worksheet) {
            $this->setActiveSheetIndex($this->getIndex($worksheet));
            return $worksheet;
        }

        throw new PHPExcel_Exception('Workbook does not contain sheet:' . $pValue);
    }
308918
public function addSheet(PHPExcel_Worksheet $pSheet, $iSheetIndex = NULL)
    {
        if ($this->sheetNameExists($pSheet->getTitle())) {
            throw new PHPExcel_Exception(
            	"Workbook already contains a worksheet named '{$pSheet->getTitle()}'. Rename this worksheet first."
            );
        }

        if($iSheetIndex === NULL) {
            if ($this->_activeSheetIndex < 0) {
                $this->_activeSheetIndex = 0;
            }
            $this->_workSheetCollection[] = $pSheet;
        } else {
            // Insert the sheet at the requested index
            array_splice(
                $this->_workSheetCollection,
                $iSheetIndex,
                0,
                array($pSheet)
                );

            // Adjust active sheet index if necessary
            if ($this->_activeSheetIndex >= $iSheetIndex) {
                ++$this->_activeSheetIndex;
            }
        }

        if ($pSheet->getParent() === null) {
            $pSheet->rebindParent($this);
        }

        return $pSheet;
    }
1357507
public function setBrowser(\BlackForest\PiwikBundle\Entity\PiwikBrowser $browser = null)
    {
        $this->browser = $browser;

        return $this;
    }
161681
public function setDataValidation(PHPExcel_Cell_DataValidation $pDataValidation = null)
    {
        if (!isset($this->parent)) {
            throw new PHPExcel_Exception('Cannot set data validation for cell that is not bound to a worksheet');
        }

        $this->getWorksheet()->setDataValidation($this->getCoordinate(), $pDataValidation);

        return $this->notifyCacheController();
    }
1173786
public function addCellStyleXf(PHPExcel_Style $pStyle)
    {
        $this->cellStyleXfCollection[] = $pStyle;
        $pStyle->setIndex(count($this->cellStyleXfCollection) - 1);
    }