Hello,
Recently I am using phpexcel and afer many tries I wasn't able to find out how to
make a document with a image in its header.
Here is a simplified code that I am using. Can someone helps me with this issue?!
<?php
require_once 'PHPExcel.php';
$objPHPExcel = new PHPExcel();
$objDrawing = new PHPExcel_Worksheet_HeaderFooterDrawing();
$objDrawing->setPath('header.jpg');
$objPHPExcel->getActiveSheet()->getHeaderFooter()->addImage($objDrawing, PHPExcel_Worksheet_HeaderFooter::IMAGE_HEADER_RIGHT);
$objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader("&C&G");
$objPHPExcel->setActiveSheetIndex(0)->setCellValueExplicit('A1', 'CODICE PRATICA');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel);
$objWriter->save('test.xlsx');
?>