Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>
There are a lot of ways on the Internet
1. The error of header and buffer result in calling save(“ php://output “Before calling ob_ end_ clean()
2. Delete the break in line 581 of the file
3. Will: $objwriter = – phpexcel_ IOFactory::createWriter($objPHPExcel, ‘Excel5’); Modify to $objwriter = phpexcel_ Writer_ Excel2007($objPHPExcel);
4. Change the export file suffix to. Xlsx
The final solution: change the above method 3excel5 to Excel2007: $objwriter = – phpexcel_ IOFactory::createWriter($objPHPExcel, ‘Excel2007’);