Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lukegalea16's avatar

PhpOffice\PhpSpreadsheet\Writer\Exception File '' does not exist

Hi! I'm new to Laravel Excel and I'm trying to add a drawing to my Excel file. The drawing works well when exporting to PDF but not when exporting an Excel file since I get this error "PhpOffice\PhpSpreadsheet\Writer\Exception File http://test.local/assets/img/logo.png does not exist". Has anyone encountered this issue?

0 likes
2 replies
vybeauregard's avatar

Check the path to your logo. You'll probably need to reference the local filesystem path rather than the URL.

lukegalea16's avatar

@vybeauregard Hi! In fact I managed to get it to work using public_path. Unfortunately it does not work with MPDF however when generating the PDF. I get an image not found icon instead. For the pdf it worked using the asset helper function then... Perhaps I'll provide a different path in drawings based on whether I am downloading an EXCEL or PDF.

Please or to participate in this conversation.