I have a PHPGRID whose data is loaded from an array
I want to export to CSV or Excel 7 for this use
$grid["export"] = array("format"=>"csv", "filename"=>"fichero_averias");
$g->set_actions(array(
"add"=>false,
"edit"=>false,
"delete"=>false,
"view"=>true,
"rowactions"=>false,
"autofilter" => true,
"export_csv"=>true,
"search" => "advance",
"showhidecolumns" => true,
"refresh" => false
)
) ;
but does not export any data, just an html header
example
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html lang="es">
what can be due?
Regards,
The header of the html was a blip.
The message I get is
Please specify tablename or select command
and opens a blank CSV file
Make sure you set table to your array data.
$g->table = $arr;
Code: http://phpgrid.org/demo/demos/loading/load-array.phps
Live: http://phpgrid.org/demo/demos/loading/load-array.php