cakephp - Export Excel file using xlsHelper -
i using xlshelper of cakephp export in excel format.it working fine in major browser , opening file in operating system except "mac" operating system?
may you..
<?php $this->layout=""; $filename=strtotime("now"); header ("expires: 0"); header ("last-modified: " . gmdate("d,d m yh:i:s") . " gmt"); header ("cache-control: no-cache, must-revalidate"); header ("pragma: no-cache"); header ("content-type: application/vnd.ms-excel"); header ("content-disposition: attachment; filename=".$filename.".xls"); header ("content-description: generated report" ); // echo 'number of rows::'."\t" . count($test)."\n"; // echo "\n"; echo 'id' . "\t" . 'enrollmentid' . "\t" . 'ids' . "\t" . 'sysreq' . "\t" . 'sysproc' . "\t" . 'request' . "\t" . 'response' . "\t" . 'created' . "\n"; foreach($test $val): echo $val['abc']['id']. "\t" . $val['xyz']['enrollment_id']. "\t" . $val['bca']['ids']. "\t" . $val['mca']['_sysreq']. "\t" . $val['car']['_sysproc']. "\t" . $val['azx']['sysbatchno']. "\t" . $val['tyu']['msgs']. "\t" . $val['wer']['created']. "\n"; endforeach;
?>
Comments
Post a Comment