Does anyone know if there's a reliable way to read the binary signature of a .xls file from within a C++ application?
I need to programmatically determine whether a file is an actual Excel file without relying on the extension. The best way I can think of to do this is to examine the header signature.
Of course, if anyone has a better way, I'm open to suggestions...
My problem is that I'm not trying to create or open an Excel file. What I need to do is add code to an application that can look at a file whose extension is .xls and determine whether or not it's actually an .xls file as opposed to a file where someone has changed the extension.
Customers changing the extension has been an issue so I need a way to authenticate the file on the fly.