title: Center all text in PHPSpreadsheet and make the cells expand to fill up with context
body: <p>I struggle a bit to make all the cells set the context to center and to autoexpand so it doesnt overlap each other.</p>
  
  <p>So what I try to do is:</p>
  
  <ol>
  <li><p>Set the info in every cell to be centered since it makes better for printing to PDF/etc.</p></li>
  <li><p>Make the cells expand based on how much text there is in the cell. I dont want the the information in A to go over in cell B.</p></li>
  </ol>
  
  <p>Ive tried this code but it doesnt seem to work:</p>
  
  <pre><code>$styleArray = array(
              'borders' =&gt; array(
                  'outline' =&gt; array(
                      'style' =&gt; Alignment::HORIZONTAL_CENTER,
                  ),
              ),
          );
  
          $sheet -&gt;getStyle('A1:D30')-&gt;applyFromArray($styleArray);
  </code></pre>
  
  <p>Tho if I do it for one single cell (center context), it works. Did it like this:</p>
  
  <pre><code>$sheet-&gt;setCellValue('A2', $activitiesCount)-&gt;getStyle('A2')-&gt;getAlignment()-&gt;setHorizontal(Alignment::HORIZONTAL_CENTER);
  </code></pre>
  
  <p>For the cells expanding tho I havent found a solution for that to try yet.</p>
  
  <p>I would love to do both on all my cells with only 1 command if possible. </p>