public static function Saveexcel ($objPHPExcel, $excelName, $output) {
$objWriter = Phpexcel_iofactory::createwriter ($objPHPExcel, ' Excel5 ');
if (! Strpos ($_server [' http_user_agent '), ' Firefox ')
$excelName = UrlEncode ($excelName);
if ($output) {
Ob_end_clean ();
Header ("Content-type:application/force-download");
Header ("Content-type:application/octet-stream");
Header ("Content-type:application/download");
Header ("content-disposition:attachment; Filename= ". $excelName. ". xls");
Header ("Content-transfer-encoding:binary");
Header ("Expires:mon, Jul 1997 05:00:00 GMT");
Header ("last-modified:".) Gmdate ("D, D M Y h:i:s"). "GMT");
Header ("Cache-control:must-revalidate, Post-check=0, pre-check=0");
Header ("Pragma:no-cache");
$objWriter->save (' php://output ');
} else {
$objWriter->save ("excel/". $excelName. ". xls");
Echo ';
}
}
Excerpt from Lpdx111 's column
http://www.bkjia.com/PHPjc/478172.html www.bkjia.com true http://www.bkjia.com/PHPjc/478172.html techarticle Public static function Saveexcel ($objPHPExcel, $excelName, $output) {$objWriter = Phpexcel_iofactory::createwriter ($objPHPExcel, Excel5); if (! Strpos ($_server [http_user_age ...