You are here

public function PHPExcel_Style_Color::setARGB in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Color.php \PHPExcel_Style_Color::setARGB()

* Set ARGB * *

Parameters

string $pValue: * @return PHPExcel_Style_Color

1 call to PHPExcel_Style_Color::setARGB()
PHPExcel_Style_Color::applyFromArray in vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Color.php
* Apply styles from array * * <code> * $objPHPExcel->getActiveSheet()->getStyle('B2')->getFont()->getColor()->applyFromArray( array('rgb' => '808080') ); * </code> * *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Color.php, line 196

Class

PHPExcel_Style_Color
PHPExcel_Style_Color

Code

public function setARGB($pValue = PHPExcel_Style_Color::COLOR_BLACK) {
  if ($pValue == '') {
    $pValue = PHPExcel_Style_Color::COLOR_BLACK;
  }
  if ($this->_isSupervisor) {
    $styleArray = $this
      ->getStyleArray(array(
      'argb' => $pValue,
    ));
    $this
      ->getActiveSheet()
      ->getStyle($this
      ->getSelectedCells())
      ->applyFromArray($styleArray);
  }
  else {
    $this->_argb = $pValue;
  }
  return $this;
}