You are here

public function PHPExcel_Writer_Excel2007_Style::allConditionalStyles in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php \PHPExcel_Writer_Excel2007_Style::allConditionalStyles()

* Get an array of all conditional styles * *

Parameters

PHPExcel $pPHPExcel: * @return PHPExcel_Style_Conditional[] All conditional styles in PHPExcel * @throws PHPExcel_Writer_Exception

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php, line 594

Class

PHPExcel_Writer_Excel2007_Style
PHPExcel_Writer_Excel2007_Style

Code

public function allConditionalStyles(PHPExcel $pPHPExcel = null) {

  // Get an array of all styles
  $aStyles = array();
  $sheetCount = $pPHPExcel
    ->getSheetCount();
  for ($i = 0; $i < $sheetCount; ++$i) {
    foreach ($pPHPExcel
      ->getSheet($i)
      ->getConditionalStylesCollection() as $conditionalStyles) {
      foreach ($conditionalStyles as $conditionalStyle) {
        $aStyles[] = $conditionalStyle;
      }
    }
  }
  return $aStyles;
}