ExcelBundle icon indicating copy to clipboard operation
ExcelBundle copied to clipboard

Use Drawing

Open picks44 opened this issue 7 years ago • 1 comments

i'm trying to insert images in my Excel using the createPHPExcelWorksheetDrawing() function but I get this message all the time File http://benefest.local/uploads/persons/image/58af244d3f58c_16143190_10210682923503464_8658615512523719175_n.jpg not found!

Here is my code

$objDrawing = $this->phpexcel->createPHPExcelWorksheetDrawing();
$objDrawing->setPath($path);
$objDrawing->setWidth(30);
$objDrawing->setCoordinates('A1');
$objDrawing->setWorksheet($phpExcelObject->getActiveSheet());

My images are uploaded by VichUploader bundle, and I'm generating the absolute path through a function. which returns me http://benefest.local/uploads/persons/image/58af244d3f58c_16143190_10210682923503464_8658615512523719175_n.jpg In a browser, this image is displayed!

Any clue?

picks44 avatar Feb 22 '18 12:02 picks44

Seems you are using a dummy host locally? I think the path should be a accessable path for the server either a absolute document path or http url.

chy89310 avatar Mar 29 '18 03:03 chy89310