Converts excel file cell style info into css
@param int $row
@param int $col
@param int $sheet
@return string
763043
public function getCssStyle($row, $col, $sheet=0)
    {
        $css = "";
        $font = $this->font($row, $col, $sheet);
        if ($font != "") {
            $css .= "font-family:$font;";
        }
        $align = $this->align($row, $col, $sheet);
        if ($align != "") {
            $css .= "text-align:$align;";
        }
        $height = $this->height($row, $col, $sheet);
        if ($height != "") {
            $css .= "font-size:$height" . "pt;";
        }
        $bgcolor = $this->bgColor($row, $col, $sheet);
        if ($bgcolor != "") {
            $bgcolor = $this->colors[$bgcolor];
            $css .= "background-color:$bgcolor;";
        }
        $color = $this->color($row, $col, $sheet);
        if ($color != "") {
            $css .= "color:$color;";
        }
        $bold = $this->bold($row, $col, $sheet);
        if ($bold) {
            $css .= "font-weight:bold;";
        }
        $italic = $this->italic($row, $col, $sheet);
        if ($italic) {
            $css .= "font-style:italic;";
        }
        $underline = $this->underline($row, $col, $sheet);
        if ($underline) {
            $css .= "text-decoration:underline;";
        }
        // Borders
        $bLeft = $this->borderLeft($row, $col, $sheet);
        $bRight = $this->borderRight($row, $col, $sheet);
        $bTop = $this->borderTop($row, $col, $sheet);
        $bBottom = $this->borderBottom($row, $col, $sheet);
        $bLeftCol = $this->borderLeftColor($row, $col, $sheet);
        $bRightCol = $this->borderRightColor($row, $col, $sheet);
        $bTopCol = $this->borderTopColor($row, $col, $sheet);
        $bBottomCol = $this->borderBottomColor($row, $col, $sheet);
        // Try to output the minimal required style
        if ($bLeft != "" && $bLeft == $bRight && $bRight == $bTop && $bTop == $bBottom) {
            $css .= "border:" . $this->lineStylesCss[$bLeft] . ";";
        } else {
            if ($bLeft != "") {
                $css .= "border-left:" . $this->lineStylesCss[$bLeft] . ";";
            }
            if ($bRight != "") {
                $css .= "border-right:" . $this->lineStylesCss[$bRight] . ";";
            }
            if ($bTop != "") {
                $css .= "border-top:" . $this->lineStylesCss[$bTop] . ";";
            }
            if ($bBottom != "") {
                $css .= "border-bottom:" . $this->lineStylesCss[$bBottom] . ";";
            }
        }
        // Only output border colors if there is an actual border specified
        if ($bLeft != "" && $bLeftCol != "") {
            $css .= "border-left-color:" . $bLeftCol . ";";
        }
        if ($bRight != "" && $bRightCol != "") {
            $css .= "border-right-color:" . $bRightCol . ";";
        }
        if ($bTop != "" && $bTopCol != "") {
            $css .= "border-top-color:" . $bTopCol . ";";
        }
        if ($bBottom != "" && $bBottomCol != "") {
            $css .= "border-bottom-color:" . $bBottomCol . ";";
        }

        return $css;
    }
1277892
public static Cell[] getColumn(final Sheet sheet, final int col) {
        ArgUtils.notNull(sheet, "sheet");

        int maxRow = getRows(sheet);
        Cell[] cells = new Cell[maxRow];
        for(int i=0; i < maxRow; i++) {
            Row rows = sheet.getRow(i);
            if(rows == null) {
                rows = sheet.createRow(i);

            }

            Cell cell = rows.getCell(col);
            if(cell == null) {
                cell = rows.createCell(col, CellType.BLANK);
            }

            cells[i] = cell;
        }

        return cells;
    }
1050898
public function getDataCellContent($row)
	{
		$data=$this->grid->dataProvider->data[$row];
		if($this->urlExpression!==null)
			$url=$this->evaluateExpression($this->urlExpression,array('data'=>$data,'row'=>$row));
		else
			$url=$this->url;
		if($this->labelExpression!==null)
			$label=$this->evaluateExpression($this->labelExpression,array('data'=>$data,'row'=>$row));
		else
			$label=$this->label;
		$options=$this->linkHtmlOptions;
		if(is_string($this->imageUrl))
			return CHtml::link(CHtml::image($this->imageUrl,$label),$url,$options);
		else
			return CHtml::link($label,$url,$options);
	}
926722
protected function row(Row $row, array $cells)
	{
		$html = '<tr';
		$this->addAttributes($html, $row->getAttributes());
		$html .= '>' . implode('', $cells) . '</tr>';

		return $html;
	}
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);
	}
342907
public function get_row_html($row, $classname = '') {
        static $suppress_lastrow = NULL;
        $rowclasses = array();

        if ($classname) {
            $rowclasses[] = $classname;
        }

        $rowid = $this->uniqueid . '_r' . $this->currentrow;
        $html = '';

        $html .= html_writer::start_tag('tr', array('class' => implode(' ', $rowclasses), 'id' => $rowid));

        // If we have a separator, print it
        if ($row === NULL) {
            $colcount = count($this->columns);
            $html .= html_writer::tag('td', html_writer::tag('div', '',
                    array('class' => 'tabledivider')), array('colspan' => $colcount));

        } else {
            $colbyindex = array_flip($this->columns);
            foreach ($row as $index => $data) {
                $column = $colbyindex[$index];

                $attributes = [
                    'class' => "cell c{$index}" . $this->column_class[$column],
                    'id' => "{$rowid}_c{$index}",
                    'style' => $this->make_styles_string($this->column_style[$column]),
                ];

                $celltype = 'td';
                if ($this->headercolumn && $column == $this->headercolumn) {
                    $celltype = 'th';
                    $attributes['scope'] = 'row';
                }

                if (empty($this->prefs['collapse'][$column])) {
                    if ($this->column_suppress[$column] && $suppress_lastrow !== NULL && $suppress_lastrow[$index] === $data) {
                        $content = '&nbsp;';
                    } else {
                        $content = $data;
                    }
                } else {
                    $content = '&nbsp;';
                }

                $html .= html_writer::tag($celltype, $content, $attributes);
            }
        }

        $html .= html_writer::end_tag('tr');

        $suppress_enabled = array_sum($this->column_suppress);
        if ($suppress_enabled) {
            $suppress_lastrow = $row;
        }
        $this->currentrow++;
        return $html;
    }
960287
protected function renderDataCellContent($row, $data)
    {
        echo CHtml::link(CHtml::value($data, $this->nameColumn), array('view', 'id' => $data->{$this->idColumn}));
    }
455975
public function getCellValue(int $col, int $row): string
    {
        if (!isset($this->structure[$row][$col])) {
            return '';
        }

        return $this->structure[$row][$col]['value'];
    }
1193519
protected function renderDataCellContent($row, $data)
    {
        if ($this->userId !== null) {
            echo TbHtml::linkButton(
                TbHtml::icon(TbHtml::ICON_REMOVE),
                array(
                    'color' => TbHtml::BUTTON_COLOR_LINK,
                    'size' => TbHtml::BUTTON_SIZE_MINI,
                    'url' => array('revoke', 'itemName' => $data['name'], 'userId' => $this->userId),
                    'rel' => 'tooltip',
                    'title' => Yii::t('AuthModule.main', 'Revoke'),
                )
            );
        }
    }
728517
public function write_number($row, $col, $num, $format = null) {
        $this->worksheet->getStyleByColumnAndRow($col, $row+1)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_GENERAL);
        $this->worksheet->setCellValueExplicitByColumnAndRow($col, $row+1, $num, PHPExcel_Cell_DataType::TYPE_NUMERIC);
        $this->apply_format($row, $col, $format);
    }
1005291
protected function applyBorderStyle($row, $col, string $param, $value) : bool
    {
        $buffer = $this->getBuffer();

        if (!isset($buffer[$row])) {
            return false;
        }

        if (!isset($buffer[$row][$col])) {
            return false;
        }

        // Os estilos de borda são aplicados apenas  no topo e na esquerda
        // Isso diminui a carga na estilização da planilha e corrige possiveis
        // bugs no objeto Spreadsheet

        $names = explode('-', $param);
        $direction = $names[1]; // top, right, bottom, left

        switch($direction) {
            case 'top':
                $this->applyBorderTop($row, $col, $param, $value);
                break;

            case 'left':
                $this->applyBorderLeft($row, $col, $param, $value);
                break;

            case 'right':
                $this->applyBorderRight($row, $col, $param, $value);
                break;

            case 'bottom':
                $this->applyBorderBottom($row, $col, $param, $value);
                break;
        }

        return true;
    }
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);
    }
266877
protected function getDefaultStyleArrayForRow($row)
    {
        $style = $this->getDefaultStyleForFilledCells();

        if ($this->getOption(self::OPTION_ZEBRA)) {
            if (($row % 2) == 0) {
                $bgColor = $this->getOption(self::OPTION_ZEBRA_COLOR_EVEN);
            } else {
                $bgColor = $this->getOption(self::OPTION_ZEBRA_COLOR_ODD);
            }

            if ($bgColor) {
                $style['fill'] = [
                    'fillType' => Fill::FILL_SOLID,
                    'color' => ['argb' => $bgColor],
                ];
            }
        }

        return $style;
    }
1241540
public function write_url($row, $col, $url, $format = null) {
        $this->worksheet->setCellValueByColumnAndRow($col, $row+1, $url);
        $this->worksheet->getCellByColumnAndRow($col, $row+1)->getHyperlink()->setUrl($url);
        $this->apply_format($row, $col, $format);
    }
157310
public function icon(Column\Icon $column, array $row)
    {

        $html = '';
        $html .= '<i class="fa '. $column->getValue($row).'"></i>';

        return $this->post($html, $column, $row);
    }
1094255
public function col_classname($row) : string {
        $output = '';
        if (class_exists($row->classname)) {
            $task = new $row->classname;
            if ($task instanceof \core\task\scheduled_task) {
                $output = $task->get_name();
            }
        }

        $output .= \html_writer::tag('div', "\\{$row->classname}", [
                'class' => 'task-class',
            ]);
        return $output;
    }
610682
public function other_cols($column, $row) {
        if (preg_match('/^status([\d]+)$/', $column, $matches)) {
            $versionid = $matches[1];
            return $this->status($versionid, $row);
        }
        if (preg_match('/^usermodified([\d]+)$/', $column, $matches)) {
            if ($row->$column && $row->$column != $row->id) {
                $user = (object)['id' => $row->$column];
                username_load_fields_from_object($user, $row, 'mod');
                return $this->username($user, true);
            }
            return ''; // User agreed by themselves.
        }
        return null;
    }