You are here

public function PHPExcel_Style_NumberFormat::setBuiltInFormatCode in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/NumberFormat.php \PHPExcel_Style_NumberFormat::setBuiltInFormatCode()

* Set Built-In Format Code * *

Parameters

int $pValue: * @return PHPExcel_Style_NumberFormat

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/NumberFormat.php, line 237

Class

PHPExcel_Style_NumberFormat
PHPExcel_Style_NumberFormat

Code

public function setBuiltInFormatCode($pValue = 0) {
  if ($this->_isSupervisor) {
    $styleArray = $this
      ->getStyleArray(array(
      'code' => self::builtInFormatCode($pValue),
    ));
    $this
      ->getActiveSheet()
      ->getStyle($this
      ->getSelectedCells())
      ->applyFromArray($styleArray);
  }
  else {
    $this->_builtInFormatCode = $pValue;
    $this->_formatCode = self::builtInFormatCode($pValue);
  }
  return $this;
}