I'm trying to use the .xlsx template, which already has headers and footers, upper and lower.
I upload a file, then immediately issue a new one:
/* путь к файлу верный */ $pExcel = PHPExcel_IOFactory::load($path); $objWriter = new PHPExcel_Writer_Excel5($pExcel); header('Content-Type: application/vnd.ms-excel'); header('Content-Disposition: attachment;filename="myxls.xls"'); header('Cache-Control: max-age=0'); $objWriter->save('php://output');
Footer text is displayed, but there is no image.
If you put the output in the code and see what is shown in the images, then that's right.
Code:
var_dump($aSheet->getHeaderFooter()->getImages());
Conclusion:
array (size=1) 'LH' => object(PHPExcel_Worksheet_HeaderFooterDrawing)[1057] private '_path' => string 'zip://D:\JENTEK\mebs\trunk\application/../www/files/load.xlsx#xl/media/image1.png' (length=81) protected '_name' => string 'mebs_logo_excel' (length=15) protected '_offsetX' => string '0' (length=1) protected '_offsetY' => string '0' (length=1) protected '_width' => int 112 protected '_height' => int 145 protected '_resizeProportional' => boolean true private '_imageIndex' (PHPExcel_Worksheet_BaseDrawing) => int 0 protected '_description' => null protected '_worksheet' => null protected '_coordinates' => null protected '_rotation' => null protected '_shadow' => null private '_path' (PHPExcel_Worksheet_Drawing) => null
However, this image in the generated file is not. Tell me, please, why so?