There are time when I open an Excel file and it says: “your file is corrupt”. The actual message looks like this.
Of course, Excel can do a certain amount of recovery on a corrupt file, but it’s often not powerful enough direct me to the exact problem so that I can try to fix it.
Let me give a more solid example.
Since Excel is really just a collection of XML files, and I can verify that each XML file is (in itself) valid XML, the corruption must be somewhere in the cross-referencing between these different XML files. For example, an rId
in one file (e.g. xl/worksheets/sheet1.xml
) might be referencing the wrong rId
in another file (e.g. xl/worksheets/rels/shit1.xml.rels
).
In much the same way that one can validate an XML file with an XSD file, is there a proper means of validating an Excel file?