Re: Datagrid and Excel
| From: | Köteles Zoltán | Date: | Mon, 28 Aug 2006 15:00:01 +0000 |
| Subject: | Re: Datagrid and Excel | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-25003@lists.php.net to get a copy of this message | ||
Justin Patrin írta:
On 8/28/06, Köteles Zoltán <zoltan.koteles@chello.hu> wrote:ZoTyAHello, I'd like to create an excel file with DataGrid, but I always get the full page not the only query result. Here's my code: $rankitem = intval($_GET['rit']); require_once 'Structures/DataGrid.php'; $datagrid =& new Structures_DataGrid($rankitem); $options = array('dsn' => 'mysql://gtk:******@localhost/gtk'); $result = $datagrid->bind("There is no way from this code that DataGrid could *not* be using your query. Perhaps you mean something different? What do you mean by "query result"? It seems to be that the result of your database query is what you should be seeing here. What do you mean by "full page"? I see the full page with menus, images etc in the excel file. But I'd like to see only the query result in the excel file. The result is on the excel file, but there's the menu too.SELECT u.user_id AS uid, u.name AS name, u.user_name AS username, rankpts+gpa AS points FROM Users u ORDER BY rankpts+gpa DESC", $options);$datagrid->render(DATAGRID_RENDER_XLS); How can I do that if I want to see only the query result not the full page?