$objDrawing = new PHPExcel_Worksheet_Drawing();
$objDrawing->setName('My Image');
$objDrawing->setDescription('The Image that I am inserting');
$objDrawing->setPath('img/n/HERE_MY_VARIABLE.png');
$objDrawing->setResizeProportional(true); $objDrawing->setWidthAndHeight(50, 50);
$objDrawing->setCoordinates('H4');
$objDrawing->setWorksheet($objPHPExcel->getActiveSheet());
it is possible to use a variable, for example:
$objDrawing = new PHPExcel_Worksheet_Drawing(); $objDrawing->setName('My Image'); $objDrawing->setDescription('The Image that I am inserting'); $objDrawing->setPath('img/n/HERE_MY_VARIABLE.png'); $objDrawing->setResizeProportional(true); $objDrawing->setWidthAndHeight(50, 50); $objDrawing->setCoordinates('H4'); $objDrawing->setWorksheet($objPHPExcel->getActiveSheet());