phpoffice/phpspreadsheet引入 composer require phpoffice/phpspreadsheet 导出:可以直接数组导出,注释里代码为循环进行单元格赋值 ?phpuse \PhpOffice\PhpSpreadsheet\Spreadsheet;use \PhpOffice\PhpSpreadsheet\IOFactory;class ErpOrder extends Model{ public function export($adminId) { try { $