public function PHPExcel_Writer_Excel2007_Style::allNumberFormats in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php \PHPExcel_Writer_Excel2007_Style::allNumberFormats()
* Get an array of all number formats * *
Parameters
PHPExcel $pPHPExcel: * @return PHPExcel_Style_NumberFormat[] All number formats in PHPExcel * @throws PHPExcel_Writer_Exception
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel2007/ Style.php, line 693
Class
- PHPExcel_Writer_Excel2007_Style
- PHPExcel_Writer_Excel2007_Style
Code
public function allNumberFormats(PHPExcel $pPHPExcel = null) {
// Get an array of unique number formats
$aNumFmts = array();
$aStyles = $this
->allStyles($pPHPExcel);
foreach ($aStyles as $style) {
if ($style
->getNumberFormat()
->getBuiltInFormatCode() === false && !array_key_exists($style
->getNumberFormat()
->getHashCode(), $aNumFmts)) {
$aNumFmts[$style
->getNumberFormat()
->getHashCode()] = $style
->getNumberFormat();
}
}
return $aNumFmts;
}