Our Wedding Path

Daisypath Anniversary tickers

Friday, January 23, 2015

phpexcel-utk ingatan masa depan

IS application/vnd.ms-excel
AND NOT
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
EXAMPLE FOR XLS
$objPHPExcel = new PHPExcel();
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="item_list.xlsx"');
header('Cache-Control: max-age=0');
$objWriter->save('php://output');
EXAMPLE FOR XLSX
$objPHPExcel = new PHPExcel();

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="item_list.xlsx"');
header('Cache-Control: max-age=0');
$objWriter->save('php://output');

2 notes:

LydSunshine said...

Apa ni? Programming coding ke?

aYenZ JamiL (^0^)/ said...

ha'ah..utk code excel conversion..beza convert ke xls /xlsx
saja simpan untukref sendiri..

Related Posts Plugin for WordPress, Blogger...