Skip to content

Instantly share code, notes, and snippets.

Created April 1, 2014 01:00
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Um pequeno exemplo de como exportar em XLS (Excel) usando PHP.
header('Content-Type: text/html; charset=utf-8');
header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header ('Last-Modified: ' . gmdate("D,d M YH:i:s") . ' GMT');
header ('Cache-Control: no-cache, must-revalidate');
header ('Pragma: no-cache');
header ('Content-type: application/x-msexcel');
header ('Content-Disposition: attachment; filename="' . date('Y-m-d_H-i-s') . '.xls"');
header ("Content-Description: PHP Generated Data" );
<td>Crie seu conteúdo conforme o necessário</td>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment