Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: Missing embedded images ?

Status
Not open for further replies.

TomBarsh

Structural
Jun 20, 2002
1,003
On occasion I open a workbook and where I had previously pasted an image of something, instead there is a 'box' placeholder with a 'red X' in the top left, and the caption "The image part with relationship ID rID1 [the digit may vary] was not found in the file".

This is worrisome as the graphics were important. By the time I find they are missing I may not even remember exactly what it was or where it come from. But it/they were definitely put in place to provide clarity for me at a later date.

This has happened in a number of files, but a small proportion of all that I work with. Google searches produce a lot of hits for the problem; people are experiencing this in Excel, and other Office applications as well. There seems to be no definitive finding of the cause or a solution (can there even be a solution if the graphic missing?)

Does anyone have any experience with this?

I was thinking that the graphic file itself must be stored within the Excel file. The newer file formats, xlsx and xlsm, etc, can be opened to inspect the xml they are based on (this is getting way over my head). From a Walkenbach book ("Excel 2007 Power Programming with VBA") we can access the xml innards of the Excel file by (1) appending ".zip" to the filename (in File Manager, etc, not in Excel) then (2) "unzip" the file to a folder where the various xml components can be inspected. I have done this and poked around but this is all foreign to me.

I anticipated seeing some trace of the embedded graphic file and, if it's not stored within the Excel file then some description as to where it would be (in order for it to go missing). It doesn't make sense though for this to be stored separately, all such files would have to be moved onto another (removable) drive separately... but maybe this is so and that's why they go missing. I still don't buy this. But I think there must be some clue in the zip files as to where the embedded graphic is and how/why/when it/they may have gotten lost.

This might be due to my changing file formats from xlsm to xlsb and back. But I have set up a trial file and done this and not been able to force the problem.

Any ideas?
 
Replies continue below

Recommended for you

TomBarsh, the images are definitely stored in the file, under the \xl\media folder within the zip structure.

I've never seen this behaviour from memory. But if you manually delete the file from the zip structure something similar happens (with 'the picture cannot be displayed' as a caption).

As a possible workaround ensure you have the files backed up and always start from a working 'template' file format, if the workflow permits it. Simply using the last version (saving as for a new calculation for example) will eventually end up in the situation where you may end up losing your images as discribed?

Excel does corrupt files from time to time, but usually it tells you if this is the case.
 
I have never come across this problem with images, but I have seen it with embedded PDF (object) files in both excel and word.

For DOC and XLS formats, you can usually open the file with 7Zip and poke around until you find files with larger file sizes. PDF and other files attached as objects will have a name like OLE or Object I believe. You can then extract them and save as the proper .pdf file type. For some reason inline images don't show up in XLS files. You can try SAVE AS and save the file as a webpage. This will create an .htm file plus a separate folder containing all of the images. Unfortunately this doesn't work for embedded documents and PDF files.

For the newer DOCX and XLSX formats, the images and embedded documents are both stored within the zip file structure. Like Agent666 noted, images are in xl\media\ and objects like PDF files are in xl\embeddings.

Maybe you could try converting the xls files to xlsx using save as. Then try accessing the xl\media folder using 7zip.
 
Thank you both for the comments/direction. I am able to locate embedded images in the xml files (or their names).

Funny thing is that the images that are "lost" then do not show up in the xml files. So they do seem to be permanently lost.

I don't think this has happened exclusively with files that started out as .xls format and were later moved up, but includes some that were natively .xlsx or .xlsm format. And I don't think it's exclusively the result of my saving under/changing different formats over time.

I am keeping a "mine canary" on one workbook to see if that ever disappears on me.
 
By the way, this problem is a known issue with Office applications. I had found a number of discussions about this. For example, here is discussion from Microsoft's Office support (discussing PowerPoint in this case)

In fact, this link from Microsoft discusses Office 365, which has the latest versions of Excel, etc. Other discussions I've found using Google indicate that the "problem is fixed in Excel 2010, Excel 2013", etc. Apparently this is not so.
The link above does mention "One cause we have been able to reproduce and fix has to do with saving a presentation on removable media, such as a USB flash drive." And that describes my own files, as they are always on an encrypted flash drive.

One article suggested retaining copies of embedded images in a back-up file. That sure sounds like a PITA, but it may come to that.

ETA: Just noticed that the Microsoft article linked to above goes on to say:

"We need your help
"We continue to hear reports periodically about this problem, so we think there are other causes that we need to diagnose and fix. If you encounter this problem, but are not using a removable drive, we want to hear from you. Please contact us via the "smiley face" icon in the upper-right corner of PowerPoint, including as much information as possible about your images and file."

I assume the same principle applies to Excel and other Office components.
 
Sounds like they don't know either yet what causes a seemingly infrequent issue. Obvious solution is to not use removable USB media as that seems to be the cause. Is that an option?

If it must be encrypted locally, make a small partition on your computer and encrypt this, or get a more robust removable storage like a SSD vs a USB thumb drive. I've been stung before by cheap USB thumb drives failing and becoming unreadable, as long as you have a sound backup system at least it protects against this. Sync it to the cloud for backup, benifit of syncing to any other computers you might use also.

I used to do something similar to you, juggling multiple removable/portable drives, but for many reasons moved to Dropbox to simplify things and reduce the number of unique copies of stuff that I was keeping on all my devices. It has the added bonus of being able to roll back to prior or deleted versions for 30 days on the most basic plan which has saved me from excel corruption on a few occasions (on a higher tier plan I think this extends to a year), something similar could offer some degree of protection against your issue as you can roll back to a prior version with the embedded images being there. Having critical files accessible in the cloud when out from the office also is pretty handy. I've pretty much thrown away all my portable storage drives as a result of using Dropbox.
 
I love Dropbox. I've been using it for years between multiple computers and an iPhone and have never had any issues. You can get a 2GB plan for free to try it out. They occasionally offer additional free space to you for things like installing the app on your phone or providing feedback. They also give you 500mb additional free space per friend that creates an account using your invitation. Over the years I have accumulated 20GB of storage space in my free account. It works great and best of all it is free.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor