title: How to get and set height and width phpspreadsheet
body: <p>I want to set height and width in my new file from template file</p>
  
  <pre><code>$string = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex($col); // e.g. 5
  
  $width = $worksheet-&gt;getCellByColumnAndRow($col, $row)-&gt;getWidth();
  $height = $worksheet-&gt;getCellByColumnAndRow($col, $row)-&gt;getHeight();
  
  $spreadsheet-&gt;getActiveSheet()-&gt;getColumnDimension($string)-&gt;setWidth($width);
  $spreadsheet-&gt;getActiveSheet()-&gt;getRowDimension($row)-&gt;setHeight($height);
  </code></pre>
  
  <p>i have error: </p>
  
  <blockquote>
    <p>"Call to undefined method
    PhpOffice\PhpSpreadsheet\Cell\Cell::getWidth()"</p>
  </blockquote>