In my php page i have a table and if the user requires he has to export that table to excel sheet.. The code for displaying the table is:
$sql=mysql_query("SELECT * FROM attendance WHERE (year = '" . mysql_real_escape_string($_SESSION['year']) . "') and ( branch= '" . mysql_real_escape_string(($_SESSION['branch'])). "') and ( sem= '" . mysql_real_escape_string(($_SESSION['sem'])). "') and (sec= '" . mysql_real_escape_string(($_SESSION['sec'])). "')"); print ""; Print "
idno name subject Held Classes Attended Classes "; while($data=mysql_fetch_array( $sql )) < echo "".$data['idno']." ".$data['name'] . " ".$data['subject']." ".$data['heldcls'] . " ".$data['attendcls']." "; > Print "
";
how do i export this table to excel sheet. And what should b the code in excel.php. Please help me.. thank you in advance..