×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Jing Tai Piao
Added: Sep 7, 2012 12:12 AM
Views: 51
Tags: no tags
  1. // We'll be outputting an excel file
  2. header('Content-type: application/vnd.ms-excel');
  3.  
  4. // It will be called file.xls
  5. header('Content-Disposition: attachment; filename="file.xls"');
  6.  
  7. // Write file to the browser
  8. $objWriter->save('php://output');