title: set footer in all printed pages using phpexcel
body: <p><strong>What I want to achieve:</strong></p>
  
  <p>I am currently using PHPExcel and I want to display the filename and the page numbers in <strong><em>all the right hand side footer of all the printed pages</em></strong>.</p>
  
  <p>Basically the format should be</p>
  
  <pre><code>filename.xlsx Page 1 / 2
  </code></pre>
  
  <p>where <code>filename.xlsx</code> is the file name</p>
  
  <p>and 1 is the current page number</p>
  
  <p>and 2 is the total page number</p>
  
  <p><strong>What I have tried:</strong></p>
  
  <p>I have tried the following code:</p>
  
  <pre><code>$this-&gt;objPHPExcel-&gt;getActiveSheet()-&gt;getHeaderFooter()-&gt;setOddFooter('&amp;R&amp;F');
  $this-&gt;objPHPExcel-&gt;getActiveSheet()-&gt;getHeaderFooter()-&gt;setOddFooter('&amp;R&amp;P');
  $this-&gt;objPHPExcel-&gt;getActiveSheet()-&gt;getHeaderFooter()-&gt;setOddFooter('&amp;R&amp;N');
  </code></pre>
  
  <p>On the print preview we saw there are 5 sheets</p>
  
  <p>When we press print, the printer printed out 4 only. </p>
  
  <ul>
  <li>First page we only see the filename</li>
  <li>Second page we only see the number 4</li>
  <li>Third page we only see the number 5</li>
  <li>Fourth page we only see the number 4</li>
  </ul>
  
  <p>The position is correct in all the pages, ie the right hand side footer.</p>
  
  <p>The value is not.</p>
  
  <p>Please advise.</p>