PHPExcel return a corrupted binary file

不羁的心 提交于 2019-12-01 05:53:13
javiniar.leonard

Can you try to put ob_end_clean(); just before the header(...) part?

This worked for someone with the same problem. See the comment at the accepted answer of this post: PHPExcel generated excel file not working. (File format or extension is invalid ).

Note:

Using ob_end_clean() is just a work around for this problem. The main problem is that additional and unnecessary outputs are sent to the PHPExcelWriter that causes the file to get messed up.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!