title: How to get cell coordinates when iterating in PHPSpreadsheet?
body: <p>I'm trying to populate and colour some headers in PHPSpreadsheet. The number of columns can be variable. It is recommended in the docs to style cells as a range so I need to know the coordinates of the last cell to do this. </p>
  
  <p>I've tried using <code>getCellByColumnAndRow</code> as I iterate through the columns but this returns the value of the cell instead of the coordinates:</p>
  
  <pre><code>$i = 1;
  $lastCellValue = null;
  
  foreach ($headers as $header) {
      $sheet-&gt;setCellValueByColumnAndRow($i, 1, $header);
      $lastCellValue = $sheet-&gt;getCellByColumnAndRow($i, 1);
      $i++;
  }
  
  $spreadsheet-&gt;getActiveSheet()-&gt;getStyle('A1:'.$lastCellValue)-&gt;getFill()
      -&gt;setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID)
      -&gt;getStartColor()-&gt;setARGB('FFFF0000');
  </code></pre>
  
  <p><strong>How can I get the coordinates of the last cell when iterating?</strong></p>