I am using PHPExcel to create on-the-fly reports, and at the top of the reports I am trying to include a logo. This all works fine when using Excel2007, but when I try using Excel5 instead even though there is no error, it simply refuses to put the image on
the excel document.
Unfortunately because the people who will use this don't have the latest version of Excel, I have to use the Excel5 class...
I've stripped out all the other code, and this is the part of my code that doesn't seem to work:
/** PHPExcel */
/** PHPExcel_Writer_Excel5 */
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
// Send the headers to allow this document to be sent to the browser rather than saving it to disk
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Transfer-Encoding: binary ");
$objDrawing = new PHPExcel_Worksheet_Drawing();
// Set active sheet index to the first sheet, so Excel opens this as the first sheet
// Save Excel 2005 file
$objWriter = new PHPExcel_Writer_Excel5($objPHPExcel);
// Send the document to the browser
If I change the class I'm using to the Excel2007 one everything works fine. Originally I had used a jpeg but this was bringing up an error - I take it Excel5 doesn't support image types other than bipmaps so I converted the image to that. But it still
The excel document opens fine, and when I have other code in there the data is printed fine, it seems to just be the image part that isn't working.
Can someone please help me and let me know if it is something I am doing wrong?