<?php include './PHPExcel/PHPExcel.php'; include './PHPExcel/PHPExcel/Writer/Excel2007.php'; //或者include 'PHPExcel/Writer/Excel5.php'; 用于输出.xls的 //创建一个excel $objPHPExcel = new PHPExcel(); $letter = range('A','Z'); //表头 $header_arr = [ 'id', '标题', '作者…