title: PHPExcel: How to insert an image in the first page header and enlarge it to fit it's content?
body: <p>I have an Excel file made with PHPExcel which have an header with a left aligned logo and right aligned date &amp; user text. For the first page, I want a similar header (same logo and same date &amp; user text) but with some added information (title and parameters of the file centered a couples lines later).</p>
  
  <p>This is what I'm doing so far:</p>
  
  <pre><code>&lt;?php
  
      $sheet = $this-&gt;_spreadsheet-&gt;getActiveSheet(); //_spreadsheet is an instance of PHPExcel
  
      $logo = new PHPExcel_Worksheet_HeaderFooterDrawing();
      $logo-&gt;setName('Logo');
      $logo-&gt;setPath(DOCUMENT_ROOT . '/public/logo.jpg'); //Path is OK &amp; tested under PHP
      $logo-&gt;setHeight(38); //If image is larger/smaller than that, image will be proportionally resized
      $sheet-&gt;getHeaderFooter()-&gt;addImage($logo, PHPExcel_Worksheet_HeaderFooter::IMAGE_HEADER_LEFT);
  
      $sheet-&gt;getHeaderFooter()-&gt;setOddHeader('&amp;L&amp;G&amp;RExport date: ' . date('Y-m-d H:i:s') . "\n" . 'User: ' . $user-&gt;name);
  
      if ($grid-&gt;getTitle() != '') {
          $sheet-&gt;getHeaderFooter()-&gt;setDifferentFirst(true);
  
          $sheet-&gt;getHeaderFooter()-&gt;addImage($logo, PHPExcel_Worksheet_HeaderFooter::IMAGE_HEADER_LEFT);
          $sheet-&gt;getHeaderFooter()-&gt;setFirstHeader('&amp;L&amp;G&amp;C&amp;"-,Bold"' . "\n\n\n" . $grid-&gt;getTitle() . "\n" . $grid-&gt;getParameters() . '&amp;RExport date: ' . date('Y-m-d H:i:s') . "\n" . 'User: ' . $user-&gt;name);
      }
  
  ?&gt;
  </code></pre>
  
  <p>For the "regular" header, logo and text is all there so everything is OK. For the first page header I have 2 problems:</p>
  
  <ol>
  <li>The logo isn't showing on the first page header (but the text is OK).</li>
  <li>Since the centered title will be followed by some text (dynamically loaded with <em>getParameters</em>) I want the first page header to stretch to fit it's content.</li>
  </ol>
  
  <p>How can I do this with PHPExcel?</p>