INPUT JPG AND CREATE FILE

Topics: Developer Forum, User Forum
Oct 8, 2008 at 6:48 AM
HELLO
I want to know how can I input a jpg into excel using this phpexcel class?
And I want to create the excel file automaticallly. How can I do this?
THANKS~
Developer
Oct 8, 2008 at 8:56 AM
Here is the method:

$excel = new PHPExcel();
$sheet = $excel->getActiveSheet();

$drawing = new PHPExcel_Worksheet_Drawing();
$drawing->setPath('panda.jpg');
$drawing->setWorksheet($sheet);
$drawing->setCoordinates('C5');

$writer = new PHPExcel_Writer_Excel2007($excel);
$writer->save('test.xlsx');

But remember to check the documentation where there is more information. Also, in the downloaded PHPExcel release package, consult the API (found in /Documentation/API/index.html ) where you will find more methods (functions). Finally, check out the examples (located in the folder /Tests ). There are examples with images too.