title: Get Width of Auto Size column in PHPExcel
body: <pre><code>$objPHPExcel-&gt;getActiveSheet()-&gt;getColumnDimension("A")-&gt;setAutoSize(true);
  
  $Acolumnsize = $objPHPExcel-&gt;getActiveSheet()-&gt;getColumnDimension("A")-&gt;getWidth();
  
  echo "&lt;h1&gt;" . $Acolumnsize . "&lt;/h1&gt;";
  </code></pre>
  
  <p>I want to set a column to auto size itself. In this case it's column A.</p>
  
  <p>Once it has been auto sized I want to be able to use the value when determining the width of a different column so I need to know how much space column A takes up.</p>
  
  <p>Any time I used the above code the width of column A is -1 meaning the column width hasn't been set. So it seems the auto sizing isn't setting the width of the column for some reason.</p>
  
  <p>I'm wondering how do I get the width of the auto sized column?</p>