[eluser]hrg.vincent[/eluser]
I've problem in download excel in to desktop instead of server.
I use " $objWriter->save('php://output'); " and lot of non-readable characters in below and doesn't popup to ask for save.
7����ܥ5�J��=x��G?��;�yy��&I4aZ;�A[�ԓ�{�p0�t���ᵿ��#�k��J�����{�|���O�%���W���KK˷�z�=��{�w�ZY^��RJ�e����#���q�����߸���;묳�n�H��'q������g���l�cw��ï��3��������\
Code:
$this->load->library('PHPExcel');
$objPHPExcel = new PHPExcel();
$objPHPExcel->getProperties()->setTitle("title")
->setDescription("description");
$objPHPExcel->setActiveSheetIndex(0);
$objPHPExcel->getActiveSheet()->setCellValue('B4', 'Visa Application Report');
ob_end_clean();
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header('Content-type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="myfile.xls"');
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
ob_end_clean();
$objWriter->save('php://output');
$objPHPExcel->disconnectWorksheets();
unset($objPHPExcel);