Image on excel couldn't be saved?

Topics: Developer Forum, User Forum
Jul 15, 2010 at 9:05 AM



Sorry I'm new to PHPExcel and I have gone through the discussion but couldn't find any solution to my problem.


I have looked through the examples and I am referring to 05featuredemo.php. It has images in the excel and has no problem saving it on the server. However, when I try to do the following so that the user can save the file, the image doesn't work at all and so is the data. Is there any solution to this so that the file is prompt for the user to download instead of saving in the server?


header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');

header('Content-Disposition: attachment;filename="05featuredemo.xlsx"');header('Cache-Control: max-age=0');

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');