如何使用PHP-Excel库创建具有书写模式的Excel文件
$objPHPExcel->getActiveSheet()->setTitle('Item Report');
$objPHPExcel->setActiveSheetIndex(0);
header('Content-type: text/csv');
header('Content-Disposition: attachment;filename="Vendor Report-'.date('d-m-Y').'.xls"');
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
答案 0 :(得分:1)