Showing posts with label export in php. Show all posts
Showing posts with label export in php. Show all posts

Monday 7 April 2014

Export in Excel doc in php


//header("Cache-Control: must-revalidate, post-check=0, pre-check=0");

       //header("Content-Length: " . strlen($out));

       header("Content-type: application/vnd.ms-excel");

       //header("Content-type: application/octet-stream, charset=UTF-8; encoding=UTF-8");

       header("Content-Disposition: attachment; filename=Deal_calender.xls");

       $out = html_entity_decode( $out ,ENT_NOQUOTES,'utf-8');

       $out = chr(255).chr(254).iconv("UTF-8","UTF-16LE",$out);

       echo $out;  

       exit;