Repair Result file cannot be opened

Issue #753 duplicate
Michael Phillips
created an issue

I have noticed problems trying to open and save a relatively large Excel file. I am testing just opening the file and saving it without making any changes.

When I try to open the saved file I get an error message "Excel could not open [filename].xlsx because some content is unreadable. Do you want to open and repair this workbook?"

When I click to view the repair I get a message "The XML file Repair Result to [filename].xml cannot be opened because there is no available data view (XSLT)."

On the same message box under details it lists "Unspecified error" and "Location: 2".

I am trying to open the saved file on a Mac. Has anyone else experienced a similar problem with file corruption where the repairs are not even viewable?

I have opened and saved smaller files without any file corruption/repair problems. The file in question is about 6MB.

Thanks in advance for any input/advice!

Comments (9)

  1. CharlieC

    Unfortunately, Excel's error reports are generally not very helpful but they usually mean that there is a problem with the metadata.

    Can you supply a sample file?

  2. Michael Phillips reporter

    I think I have isolated at least one tab which, even on its own, creates a problem. The problem appears to have something to do with named ranges and/or maybe having multiple named ranges under certain conditions. Interestingly the named ranges are not used in any formulas worksheet but if I delete that named range from the workbook then I can load and save the workbook without causing any file corruption.

    The first file "hardcode_ProjectCostInput8.xlsx" is the file that I am loading and then "saved_hardcode_ProjectCostInput8.xlsx" is the name of the file that I then save to. When I try to open "saved_hardcode_ProjectCostInput8.xlsx" it generates a file unreadable error. If I remove one of the named ranges as in "hardcode_ProjectCostInput9.xlsx" then I can load that file and save to "saved_hardcode_ProjectCostInput9.xlsx" and I am able to open "saved_hardcode_ProjectCostInput9.xlsx" in Excel without any problem. Strangely, I can remove either one of the two named ranges in "hardcode_ProjectCostInput8.xlsx" and then loading and saving the file seems to work.

    hardcode_ProjectCostInput8.xlsx saved_hardcode_ProjectCostInput8.xlsx

    hardcode_ProjectCostInput9.xlsx saved_hardcode_ProjectCostInput9.xlsx

    This tab was originally part of a much larger workbook originally. Certain other tabs from the same workbook (maybe not all) seem to also cause a problem on their own but I haven't tried to isolate those other ones as yet.

    Hope that's helpful and thanks so much for taking a look!

    Best regards, Mike

  3. CharlieC

    It looks like you forgot to upload the original file with the defined names.

    In any case, at least according to the OOXML Productivity Tool, the file is formally correct. The problem does look like it's related to the defined names, of which there are a lot. It looks like they've been created by some kind of tool so access to the original file is important.

  4. Michael Phillips reporter

    The formatting in my last post is not that helpful, but there are actually two files right next each other on each line. On the first line, the file hardcode_ProjectCostInput8.xlsx is the original file while the file to the right saved_hardcode_ProjectCostInput8.xlsx is the output file. The original file should have two defined names only: Print_Area and Print_Titles.

    The second line is an original file and output file that opens without any problem. I believe it is identical to the file on the first line except it has only one defined name: Print_Titles.

    The problem may be Mac-specific. I just looked now for an OOXML validator I could install for Mac or an online version but couldn't find one. To the extent the issue is Mac-specific please don't feel compelled to hunt it down. Thanks.

  5. CharlieC

    Thanks for the extra information, really helps. The problem appears to be the same as #743. If you use a checkout of the 2.4 branch then the problem should be resolved.

    I develop on MacOS myself and Excel 2016 for Mac is now very similar to Excel 2016 for Windows. But if you're doing serious development with Excel then it's worth having a Windows VM with the Microsoft tool.

  6. Log in to comment