get hyperlink if cell is hyperlinked
@param int $row
@param int $col
@param int $sheet
@return string
559129
public function hyperlink($row, $col, $sheet=0)
    {
        $link = isset($this->sheets[$sheet]['cellsInfo'][$row][$col]['hyperlink']) ? $this->sheets[$sheet]['cellsInfo'][$row][$col]['hyperlink'] : false;
        if ($link) {
            return $link['link'];
        }
        return '';
    }
1141535
public function content($row = null)
    {
        if (null === $row) {
            // Generate content for table head column

            $result = $this->label();
            if ($this->sortable()) {
                // Column is sortable - get anchor HTML
                $result .= $this->_getSortAnchor();
            }
            return $result;
        }

        if (!$this->hasRenderer()) {
            return (string)$row->{$this->index()};
        }

        return (string)$this->renderer($row);
    }
393149
public function readCell($column, $row, $worksheetName = '')
    {
        //  Only read the heading row, and the rows that are configured in $this->_startRow and $this->_endRow
        return ($worksheetName === $this->worksheetName || $worksheetName === '')
            && ($row === $this->headingRow || ($row >= $this->startRow && $row < $this->endRow));
    }
400655
private function renderCell(array $row, $column, $cellFormat)
    {
        $cell = isset($row[$column]) ? $row[$column] : '';
        $width = $this->effectiveColumnWidths[$column];
        if ($cell instanceof TableCell && $cell->getColspan() > 1) {
            // add the width of the following columns(numbers of colspan).
            foreach (range($column + 1, $column + $cell->getColspan() - 1) as $nextColumn) {
                $width += $this->getColumnSeparatorWidth() + $this->effectiveColumnWidths[$nextColumn];
            }
        }

        // str_pad won't work properly with multi-byte strings, we need to fix the padding
        if (false !== $encoding = mb_detect_encoding($cell, null, true)) {
            $width += strlen($cell) - mb_strwidth($cell, $encoding);
        }

        $style = $this->getColumnStyle($column);

        if ($cell instanceof TableSeparator) {
            return sprintf($style->getBorderFormat(), str_repeat($style->getHorizontalBorderChar(), $width));
        }

        $width += Helper::strlen($cell) - Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell);
        $content = sprintf($style->getCellRowContentFormat(), $cell);

        return sprintf($cellFormat, str_pad($content, $width, $style->getPaddingChar(), $style->getPadType()));
    }
166580
public function getCell($row, $col) {
		if ($row < 2 && $this->hasOnlyCols($this->count()))
			return $this->getItem($col);
		$row=$this->getItem($row);
		if (isset($row)) {
			$col=$row->getItem($col);
		}
		return $col;
	}
399364
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})");
        } elseif ($this->onlyExistingCells && !($this->subject->cellExistsByColumnAndRow($this->columnIndex, $row))) {
            throw new PHPExcel_Exception('In "IterateOnlyExistingCells" mode and Cell does not exist');
        }
        $this->position = $row;

        return $this;
    }
1096180
public function backgroundCell($color, $cell=null, $row=null){
        $color = str_replace("#", "", $color);
        if(!is_null($cell)){
            $this->x = $this->getColumnName($cell);
            $this->y = $row;
        }

        $style = array('fill' => array(
            'type' => PHPExcel_Style_Fill::FILL_SOLID,
            'color' => array('rgb' => "$color")
        )
        );
        $this->engine->getActiveSheet()->getStyle("{$this->x}{$this->y}")->applyFromArray($style);
    }
1032833
public function getValue($row, Table $table) {
        $image = $this->getHTMLImage($row, $table);
        if (!$this->href) {
            return $image;
        }
        $href = "";
        if (is_string($this->href)) {
            eval("\$href = {$this->href}");
        } elseif (is_callable($this->href)) {
            $href = call_user_func($this->href, $row, $table);
        }
        return ("" != ($r = Html::get()->link($href, $image, $this->linkHtmlOptions))) ? $r : $image;
    }
731560
public function getView(int $row, array $row_data, Linker $linker): string
    {
        $linker_array = ['do' => '_accept', 'id' => $row_data['id']];
        $value = $this->getCellData($row_data);

        $cell_data = '<form action="' . $this->getParsedHref($row_data, $linker, $linker_array) . '" method="post"><input onclick="this.form.submit();" type="checkbox"' . ($value ? ' checked="checked" disabled="disabled"' : '') . ' name="input" value="1"></form>';

        return $this->getCellView($cell_data, $row_data);
    }
487292
protected function col_actions($row) {
        global $OUTPUT;

        $action = new \confirm_action(get_string('areyousure'));
        $url = new moodle_url($this->baseurl);
        $url->params(array('removecohort' => $row->id, 'sesskey' => sesskey()));
        $actionlink = $OUTPUT->action_link($url, '', $action, null, new \pix_icon('t/delete',
            get_string('stopsyncingcohort', 'tool_lp')));

        return $actionlink;

    }
641468
private function getCellXml(array $row, Style $style)
    {
        $cellXml = '';
        foreach (array_values($row) as $cellIndex => $cellValue) {
            $this->updateColumnWidths($cellValue, $cellIndex, $style->getFont());
            $cellXml .= $this->cellBuilder->build(
                $this->rowIndex, $cellIndex, $cellValue, $style->getId()
            );
        }

        return $cellXml;
    }
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());
    }
413602
public function getValue($row, $col)
    {
        $returnValue = null;
        $data = $this->getData();
        if (isset($data[$row][$col])) {
            $returnValue = $data[$row][$col];
        } else if (isset($data[$row]) && is_string($col)) {
            // try to access by col name.
            $mapping = $this->getColumnMapping();
            for ($i = 0; $i < count($mapping); $i++) {

                if ($mapping[$i] == $col && isset($data[$row][$col])) {
                    // Column with name $col extists.
                    $returnValue = $data[$row][$col];
                }
            }
        } else {
            throw new InvalidArgumentException("No value at ${row},${col}.");
        }
        return $returnValue;
    }
318187
public function renderDataCellContent($row, $data)
	{
		if ($this->grid->json) {
			if ($this->value !== null) {
				$value = $this->evaluateExpression($this->value, array('data' => $data, 'row' => $row));
			} elseif ($this->name !== null) {
				$value = CHtml::value($data, $this->name);
			}
			$value = !isset($value)
				? $this->grid->nullDisplay
				: $this->grid->getFormatter()->format(
					$value,
					$this->type
				);

			return $value;
		}
		parent::renderDataCellContent($row, $data);
	}
745376
private function getCellWidth(array $row, $column) {
        $cellWidth = 0;

        if (isset($row[$column])) {
            $cell = $row[$column];
            $cellWidth = Console::strlenWithoutDecoration($this->output->getFormatter(), $cell);
        }

        $columnWidth = isset($this->columnWidths[$column]) ? $this->columnWidths[$column] : 0;

        return max($cellWidth, $columnWidth);
    }
1199940
public static Hyperlink getHyperlink(final Cell cell) {

        ArgUtils.notNull(cell, "cell");

        Hyperlink link = cell.getHyperlink();
        if(link != null) {
            return link;
        }

        final Sheet sheet = cell.getSheet();
        CellRangeAddress mergedRange = getMergedRegion(sheet, cell.getRowIndex(), cell.getColumnIndex());
        if(mergedRange == null) {
            return null;
        }

        for(Hyperlink item : sheet.getHyperlinkList()) {
            if(item.getFirstRow() == mergedRange.getFirstRow()
                    && item.getFirstColumn() == mergedRange.getFirstColumn()) {
                return item;
            }

        }

        return null;

    }
903591
public function col_note($row) {
        if ($this->is_downloading()) {
            return $row->note;
        } else {
            return format_text($row->note, FORMAT_MOODLE);
        }
    }