-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Image does not appear in Excel file #3843
Comments
Unable to duplicate. I used your code with a template and image file of my own, and the resulting spreadsheet contained the image. Perhaps if you upload your file here, I can try to see what might be wrong. |
Sorry, there was one mistake. |
Thank you for uploading the file. This is a strange case. The xml in your template file has references to some drawings (possibly textbox form controls) which apparently are not part of the worksheet, and, when we add a new drawing, PhpSpreadsheet is getting confused about which drawings are needed. While I study what needs to be done, you might be able to use this edited template, which does not have the unused drawings, in place of your template: |
Thank you for the issue.3843a.template.edited.xlsx. |
I removed the (unused) data that was being handled incorrectly. |
Fix PHPOffice#3843. Spreadsheet XML had a lingering Xml drawing tag despite having no drawings. When a new drawing was added, PhpSpreadsheet became confused about which drawings to keep. This PR ensures that it keeps the new and drops the old.
I see. |
This is:
What is the expected behavior?
Image appears in Excel file.
What is the current behavior?
Image does not appear in Excel file.
What are the steps to reproduce?
The phenomenon occurs when the following code is executed
I would like to display an image in excel loaded using phpspreadsheet but it does not show up.
I have confirmed that the text is displayed.
I would appreciate it if you could show me how to get the images to display.
"template.xlsx" is not default Excel file.
template.xlsx
What features do you think are causing the issue
Which versions of PhpSpreadsheet and PHP are affected?
PhpSpreadsheet : 1.29.0
PHP : 7.4.33
The text was updated successfully, but these errors were encountered: