images in header in Excel5 not implemented yet :)

Jan 22, 2010 at 8:05 PM

Hello!
Thank you for great tools
I read Excel2007 file with logo image in left section of Header or generate it and save in xlsx
format with no problem

$objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader('&L&B"address"&R&G');

$objDrawing = new PHPExcel_Worksheet_HeaderFooterDrawing();
$objDrawing->setName('logo');
$objDrawing->setPath('.'.DIRECTORY_SEPARATOR.'logos'.DIRECTORY_SEPARATOR.'logo.jpg');
$objDrawing->setHeight(100);
$objPHPExcel->getActiveSheet()
->getHeaderFooter()
->addImage($objDrawing, PHPExcel_Worksheet_HeaderFooter::IMAGE_HEADER_RIGHT);

//header is present but image lost!
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('result5noimageleftheader.xls');

//work fine
$objWriter07 = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter07->save('result2007imageleftheader.xlsx');

Jan 22, 2010 at 9:47 PM

http://phpexcel.codeplex.com/Thread/View.aspx?ThreadId=43969

as mention here it's too hard ...