title: Center Text vertical and horizontal in PHPSpreadsheet
body: <p>I try to style my spreadsheet with the PHPSpreadsheet calls.
  I want to center the text vertical and horizontal.
  What I do is this:</p>
  
  <pre><code>$spreadsheet = new Spreadsheet();
  $spreadsheet-&gt;setActiveSheetIndex(0)-&gt;setCellValue('A1', 'Name');
  $spreadsheet-&gt;getActiveSheet()-&gt;getStyle('A1')-&gt;getFont()-&gt;setBold(true);
  ...
  ...
  ...
  foreach (range('A', 'E') as $columnID) {
      $spreadsheet-&gt;getActiveSheet()-&gt;getColumnDimension($columnID)-&gt;setAutoSize(true);
      $spreadsheet-&gt;getActiveSheet()-&gt;getStyle($columnID)-&gt;getAlignment()-&gt;setHorizontal('center');
      $spreadsheet-&gt;getActiveSheet()-&gt;getStyle($columnID)-&gt;getAlignment()-&gt;setVertical('center');
  }
  </code></pre>
  
  <p>But when I open the excel file, the text is not centered.
  What I am doing wrong?</p>