Monday, May 31, 2010
Top 10 AJAX,PHP,MYSQL Based Data Grid
http://www.webhostingbreak.com/top-10-ajax-php-powered-mysql-table-editor-viewer-data-grid/
Simple way of Exporting HTML Page Data to Excel
Just follow the below code and write down at bottom portion of your pages that u want to export data to excel. You dont have to do anything else....You r DONE !!
Step 1 :
copy paste the below code at the bottom of your page.
$filename = "mis_datewise_monitoring_data.xls";
header("Content-Disposition: attachment; filename=\"$filename\"");
header("Content-Type: application/vnd.ms-excel");
exit(); //remember to stop output unless you do it its own file.
Step 2:
name your excel file that u want to export data always. then create a button like export to excel.
Suggestions:
It is better to use another page for exporting html data like php mysql result will load in a page and exporting of the same data will be done from another page. You need to pass the Value of your desire through URL from current page to excel export page. Hope it is clear to you.
enjoy php...
Step 1 :
copy paste the below code at the bottom of your page.
$filename = "mis_datewise_monitoring_data.xls";
header("Content-Disposition: attachment; filename=\"$filename\"");
header("Content-Type: application/vnd.ms-excel");
exit(); //remember to stop output unless you do it its own file.
Step 2:
name your excel file that u want to export data always. then create a button like export to excel.
Suggestions:
It is better to use another page for exporting html data like php mysql result will load in a page and exporting of the same data will be done from another page. You need to pass the Value of your desire through URL from current page to excel export page. Hope it is clear to you.
enjoy php...
Subscribe to:
Posts (Atom)