Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Drawing #132

Open
picks44 opened this issue Feb 22, 2018 · 1 comment
Open

Use Drawing #132

picks44 opened this issue Feb 22, 2018 · 1 comment

Comments

@picks44
Copy link

picks44 commented Feb 22, 2018

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?

@chy89310
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants