Exporting paginated grid to excel

Hi,
please not Working, I need the export excel all rows return query , The next code not working.

Do not export the excel

<?php require_once('../../includes/conexion.inc'); require_once('../../includes/dhtmlxConnector/codebase/grid_connector.php'); require_once '../../includes/grid-excel-php/gridExcelGenerator.php'; require_once '../../includes/grid-excel-php/gridExcelWrapper.php'; $grid = new GridConnector($conn, "MySQL"); $grid->set_config(new GridConfiguration()); $query = "SELECT ......." $grid->event->attach("beforeRender", "export"); $grid->render_sql($query,"id,linea","subplan,sucursal,nom_ben,fcdespa ,id,numero,estado,cuota,plucadena,des,cantidad"); $grid->enable_log("/home/p16h9sqv/public_html/medi-net.co/descargas/log.txt"); function export($grid, $out) { $xml = simplexml_load_string($out->__toString()); $excel = new gridExcelGenerator(); $excel->printGrid($xml); die(); }

Hi,
please, provide complete demo including demo data from database.

Hi,
thanks for response.

this is the query

$query = “select id,linea, subplan,sucursal,nom_ben,fcdespa ,id,numero,estado,cuota,plucadena,des,cantidad from mn_mrecetas”;

Unfortunately there is no way to detect the problem having only the code. Please, provide complete demo, including all required scripts and files. In this way I could run your demo on local server, make some test and find the problem. Don’t forget to provide simple dump of database with demo records.