另外建议使用如下语句输出流
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="order.xls"');
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
评论