repair corrupt .xlsx?

benandjerry

Member
Aug 18, 2009
38
0
61
Had a partition wiped out, managed to recover some files with testdisk. Two (probably more) of the .xlsx files I'm attempting to open can't be opened by excel. Instead it claims they are corrupt. The Excel feature 'Open and repair' doesn't fix the issue. Have also tried a third party tool called sysinfotools xls repair with no progress as well as attempting to open the file in google docs.

Anyone have any ideas on how to fix these files, if at all possible, or are they most likely gone forever?

Any help is appreciated.
 

code65536

Golden Member
Mar 7, 2006
1,006
0
76
The new *x Office formats are actually standard zip files containing various XML files.

1) Look at the file in a hex editor. Is there even any data in the file? You're not going to get anything if the file is 0-byte with no content or if the content has been completely wiped out (full of 0x00 or 0xFF bytes).

2) If there is something there, you can treat it like a standard zip file and try to recover some of the XML files stored within, after which you can examine to files to see if there is any raw data that's salvageable. YMMV, obviously.

3) Standard rules of recovery of zip/rar/7zip/etc. apply: Any data within a dictionary block after a point of corruption is irretrievably lost. Remember that the purpose of compression is to eliminate redundancy, which necessarily means that it's intolerant of corruption.
 

benandjerry

Member
Aug 18, 2009
38
0
61
You are right, the files are beyond repairable. The size of the file is as the original but the hex code is full of zeros.

Thanks for the reply.
 

inachu

Platinum Member
Aug 22, 2014
2,387
2
41
In the past when a file was corrupt I would cut and paste new headers at the top and footers at the bottom then cut and paste the middle data then save the new document and then reattempt to open with what ever native document for that file type.

It can be hit or miss for opening them up. Sometimes the document would be repaired by the built in document wizards built into the program and will try to auto convert into proper format.