public function PHPExcel_Style_NumberFormat::setFormatCode in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/NumberFormat.php \PHPExcel_Style_NumberFormat::setFormatCode()
* Set Format Code * *
Parameters
string $pValue: * @return PHPExcel_Style_NumberFormat
1 call to PHPExcel_Style_NumberFormat::setFormatCode()
- PHPExcel_Style_NumberFormat::applyFromArray in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Style/ NumberFormat.php - * Apply styles from array * * <code> * $objPHPExcel->getActiveSheet()->getStyle('B2')->getNumberFormat()->applyFromArray( * array( * 'code' =>…
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Style/ NumberFormat.php, line 203
Class
- PHPExcel_Style_NumberFormat
- PHPExcel_Style_NumberFormat
Code
public function setFormatCode($pValue = PHPExcel_Style_NumberFormat::FORMAT_GENERAL) {
if ($pValue == '') {
$pValue = PHPExcel_Style_NumberFormat::FORMAT_GENERAL;
}
if ($this->_isSupervisor) {
$styleArray = $this
->getStyleArray(array(
'code' => $pValue,
));
$this
->getActiveSheet()
->getStyle($this
->getSelectedCells())
->applyFromArray($styleArray);
}
else {
$this->_formatCode = $pValue;
$this->_builtInFormatCode = self::builtInFormatCodeIndex($pValue);
}
return $this;
}