Open xls and insert image

Topics: Developer Forum, Project Management Forum, User Forum
Oct 2, 2011 at 8:59 PM

Hi All,

I've manage to insert an image into a new xls but cannot figure out open an xls document which I have as a template and then insert the image into the existing xls?

Replacing $objDrawing = new PHPExcel_Worksheet_Drawing();
with
$objPHPexcel = PHPExcel_IOFactory::load('template.xls'); gives me no success and gives me an undefined variable error.  

Looking through the documentation doesn't really give me a heads up on how  to pair both inserting an image into a loaded xls.

 

Any help would be great!
Thanks in advance,

James