title: Using PHPExcel in Joomla
body: <p>I've been trying to get PHPExcel to work with my Joomla. If the script saves it into file, it works fine but when I'm trying to output it to the browser for download, the file will give a warning 'File extension or file format is not valid'. My guess would be something to do with the Content-Type being served. Any ideas on how to make it work?</p>
  
  <p>Headers I've placed in view.xlsx.php:</p>
  
  <pre><code>// Redirect output to a client’s web browser (Excel2007)
  header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
  header('Content-Disposition: attachment;filename="01simple.xlsx"');
  header('Cache-Control: max-age=0');
  </code></pre>
  
  <p>This is actually a copy and paste from their example which I can assure works fine in their own script. The problem is when I'm running it in Joomla.</p>