title: PhpExcel: center align text in a single cell in a set of merged cells
body: <p>I am using PHPExcel to create a xls file. I have merged the cells (B2:E2), but I want the text entered in B2 to be horizantally center aligned in the B2 cell only. It gets center aligned in the merged cell. </p>
  
  <pre><code>$sheet_obj-&gt;getStyle('B2')-&gt;getAlignment()-&gt;setHorizontal(
      PHPExcel_Style_Alignment::HORIZONTAL_CENTER
  );
  </code></pre>