I have the following code for download the contents in excel using phpexcel. When I download the file,its showing a virus warning alert.If I tried to click the accept the risk button ,it will download the contents. I have removed the data from excel in order to check if its because of data .But still there is no change. I have added many headers in the script ,still no change.Please help me.
My php code is as follows:
session_start();
require '../config/config.php';
$db = new Database();
$conn = $db->connect();
require_once '../../PHPExcel/Classes/PHPExcel.php';
$objPHPExcel = new PHPExcel();
$objPHPExcel->setActiveSheetIndex(0);
header('Content-Type: application/vnd.ms-excel; charset=utf-8');
header('Content-Disposition: attachment; filename="excelreport.xls"');
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
//ob_end_clean();
$objWriter->save('php://output');
ob_clean();