title: PHPExcel Make first row bold
body: <p>I am trying to make cells in first row are bold.</p>
  
  <p>This is the method I have created for that purpose.</p>
  
  <pre><code>function ExportToExcel($tittles,$excel_name)
   {
    $objPHPExcel = new PHPExcel();
    $objRichText = new PHPExcel_RichText();
    // Set properties
    $objPHPExcel-&gt;getProperties()-&gt;setCreator("SAMPLE1");
    $objPHPExcel-&gt;getProperties()-&gt;setLastModifiedBy("SAMPLE1");
    $objPHPExcel-&gt;getProperties()-&gt;setTitle("SAMPLE1");
    $objPHPExcel-&gt;getProperties()-&gt;setSubject("SAMPLE1");
    $objPHPExcel-&gt;getProperties()-&gt;setDescription("SAMPLE1");
  
  
    // Add some data
    $objPHPExcel-&gt;setActiveSheetIndex(0);
  
    $letters = range('A','Z');
    $count =0;
    $cell_name="";
    foreach($tittles as $tittle)
    {
     $cell_name = $letters[$count]."1";
     $count++;
     $value = $tittle;
     $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue($cell_name, $value);
     // Make bold cells
     $objPHPExcel-&gt;getActiveSheet()-&gt;getStyle($cell_name)-&gt;getFont()-&gt;setBold(true);
    }
    // Save Excel 2007 file
    $objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel);
    //$objWriter-&gt;save(str_replace('.php', '.xlsx', __FILE__));
    $objWriter-&gt;save($excel_name.".xlsx");
   }
  </code></pre>
  
  <p>The problem is in output excel file the cells are not bold.</p>