I try for hours that my grid is exported to excel.
It has always worked, but in Phpgrid version 2.2, the xlsx file can not be read by Excel.
The same goes for exporting to PDF. It says: "TCPDF ERROR: Some data has already been output, can not send PDF file"
In the demos it works.
Here is my script:
Please check in your code OR included files code, there must be some white space character (newline etc) or html code rendered before $g->render() function call.
If there are no html or white spaces, there could be BOM character issue as well which need to be removed:
The error "TCPDF ERROR: Some data has already been output, can not send PDF file" tells exactly that.
In my script, if I use the "jqgrid_dist.php" file of the 2.1 version of phpgrid, the exported file is xls and Excel normally opens it.
In that same script, if I use the "jqgrid_dist.php" file of the 2.2 version of phpgrid, the exported file is xlsx and Excel does not recognize it as a valid file and displays an error.
The Excel program I use is Microsoft Office Professional Plus 2013, so it works with the xlsx extension
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?