Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I do this in Excel 2010 this fails, but works in Excel 2007:

  1. Create a new workbook and insert an image onto a worksheet, or get a preexisting worksheet with an image.
  2. Copy the worksheet into a new workbook by clicking the worksheet tab and clicking Move Or Copy and then choosing (new workbook) as the destination.
  3. Close the source workbook.
  4. Attempt to save the new workbook.

The message is: "Errors were detected while saving 'myfilepathhere.xlsx'. Microsoft Excel may be able to save the file b removing or repairing some features. To make the repairs in a new file, click Continue. To cancel saving the file, click Cancel". Clicking continue brings up another file dialog window followed by more repair errors.

It seems behind the scenes it is looking to the source workbook when it tries to save the image in the new destination workbook. No useful error message, of course, thanks microsoft. But this problem never happened in Excel 2007.

The reason why I am closing the source notebook before the save, is because I don't need the end user to see it after I programmatically pull a coversheet (with the image) from it, in an interop app.

Thanks for any help.

Update: I don't encounter this problem if I open the source workbook as "Read Only" (I do this programmatically using Excel Interop).

share|improve this question
Are you sure the problem is caused by closing the source document? – user3463 Dec 7 '11 at 1:25
@RandolphWest : Yes, pretty sure. When the source workbook is open, the destination workbook saves with no error messages. When the source workbook is closed, the destination workbook won't save properly. Maybe in Excel 2007, doing a worksheet copy to a new workbook copies the embedded image right away... but in 2010 it looks to the source document when you go to save. Also it doesn't matter/still breaks the destination save when I do a worksheet.copy in C# interop, and also when I recreate it manually using the above steps in Excel. Thanks. – Snorehorse Dec 7 '11 at 23:40
So the obvious answer is to not close the source document until you've finished processing it. Or change the code to paste-special, which pastes a copy of the image(s) and not a link to the image(s), if that's what the problem is. – user3463 Dec 8 '11 at 5:29
I don't want a situation where the end user can close the source workbook, and thereby break the destination workbook save. I'd rather not even show the source workbooks to the end user, which I didn't have to do, until I encountered my problem with Excel 2010. If I wanted my user to save their programmatically created workbook, I'd have to keep all the source docs open so that the destination would save properly. – Snorehorse Dec 8 '11 at 17:12
You may need to rethink the way you're doing this anyway. There are multiple points of failure in the process. That of course is outside the scope of this question. – user3463 Dec 8 '11 at 23:00
  1. Open an empty spreadsheet and insert an image.
  2. Save the spreadsheet and for example we name it spreadsheet1.xlsx
  3. Close spreadsheet1.xlsx
  4. Open another spreadsheet, save it and name it spreadsheet2.xlsx
  5. Now, open spreadsheet1.xlsx
  6. Press the save button before copying/moving the tab/sheet.
  7. Copy or move the sheet/tab on spreadsheet1.xlsx that contains the image to spreadsheet2.xslx
  8. If you selected Copy, manually close spreadsheet1.xlsx; if you selected Move, Excel will close spreadsheet1.xlsx automatically.

You will now be able to save it successfully.

share|improve this answer
You didn't answer the "what changed" part. – Snorehorse Jul 18 '14 at 0:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.