jQuery UI Widgets › Forums › Grid › exportdata exporting empty file
Tagged: export, grid
This topic contains 4 replies, has 4 voices, and was last updated by olegr 3 months, 1 week ago.
1) So I did the following in my code:
$_("#search_results_panel_grid").jqxGrid('exportdata', 'xls', 'Search_Results',true,null,true,'http://myserver.com/save-file.php');
And when I tried to download the file, it downloaded an empty xls file, why is it like this?
2) Secondly the sample code mentioned here (https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-api.htm?search=grid)shows
$("#jqxGrid").jqxGrid('exportdata', 'json', 'jqxGrid', true, null, true, http://www.myserver.com/save-file.php);
The URL is not inside single or double quotes. Is that an error? Because my editor complains if I don’t put single quotes just like I have shown above.
The ‘http://myserver.com/save-file.php’ part is a sample. You should replace it with the URL where you uploaded the file.
I am already using my server URL and it’s generating empty file. Please read my questions again carefully and answer.
Yes, i read it and the previous answer is still valid.
The string should be replaced with your url.
And when you do that check whether your server can run php.
Hi walker1234, I had the same issue and I just replaced save-file.php with dataexport.php
You must be logged in to reply to this topic.