I have used some code in which i am exporting database table data to excel sheet using php. But whenever it downloads the file first it opens with a error that it is not in supported format. By clicking yes it opens and show my complete data but in the last of the sheet the footer is also displayed.
Code
<?php
if(isset($_POST['download'])){
// The function header by sending raw excel
header("Content-type: application/vnd-ms-excel");
// Defines the name of the export file "codelution-export.xls"
header("Content-Disposition: attachment; filename=Subscribers.xls");
ob_clean();
// Add data table
include 'data.php';
}
error
in sheet error
i want to remove the footer from the excel sheet and the error in opening the file.