is there any to export data from mysql to excelsheet through PHP..
Thanks in advance..!! :D
It isn't through PHP but if you don't mind doing it manually, use PHPMyAdmin to do it (Most web hosts provide it as the tool to manage your MySQL database).
Select the fields from database and use the below code.
$filename="excelsheet";
header("Content-type: application/excel");
header("Content-Disposition: attachment; filename=".$filename.".xls");
header("Pragma: no-cache");
header("Expires: 0");
echo"'<table>
<tr><th>column 1</th>
<th>column 2</th>";
I think this will help u..
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.