1
$objDrawing = new PHPExcel_Worksheet_Drawing();
$objDrawing->setName('Image Name');
$objDrawing->setDescription('Sample');
$objDrawing->setPath('C:/Users/Downloads/'.$image);
$objDrawing->setHeight(100);
$objDrawing->setWidth(100);     
$objDrawing->setResizeProportional(FALSE);
$objDrawing->setCoordinates('A1');   
$objDrawing->setOffsetX(30);             
$objDrawing->setWorksheet($objPHPExcel->getActiveSheet()); 

Using above code i get the image from database and try to set the image in particular image box. The image box contains (A1:D18) merge excel. But I can resize the image set the 100 for width and height but these size is variation for image size. How can I fix these size to all image.

Marc
  • 3,683
  • 8
  • 34
  • 48
Saravanan Selvam
  • 163
  • 1
  • 5
  • 17

0 Answers0