A passionate programmer’s findings in the world of internet.

Archive for November, 2008

How to Recover Corrupted Excel File?

Friday, November 28th, 2008

When you an try to open a Microsoft Office Excel file, you get an error message that sounds like:

The file you are trying to open, 'XXX.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file?

Most of the time, when you get that message, your Excel file is corrupted. Here's a way to get data from your corrupted file.

  1. In office 2007, click on the round office button, then 'Open' (in older versions, go to File > Open).
  2. Select the problematic Excel file. Then, click on the small triangle on the right of the 'Open' button.
  3. Click on 'Select and Repair...'.
  4. Then, 'Extract Data'.
  5. Try both 'Convert to Values' and 'Recover Formulas' ('Convert to Values' works for me).

The small menu at Open button if you can't find it:
Open Button in Excel

Of course, you are going to lose some formatting or data, but at least you still have something.

Hope this helps.