As you noted, you can determine from the header signature if it is a Microsoft binary file, but not the specific file type. Unfortunately, if you don’t trust the file extension, there’s no prescribed method for how to determine the file type.
Even though there is no officially endorsed way to determine the file type without the file extension, some third-party utilities have used properties that are unique and required from the Office file formats documentation to create utilities that can determine file type with a high degree of confidence. File for Windows is an open-source example that you could look at for a starting point.
Mike Bowen
Escalation Engineer Microsoft Open Specifications
Hello Ghanashyamsatpathy,
I will look into this and have some information for you soon.
Mike Bowen
Escalation Engineer Microsoft Open Specifications
@GHANASHYAM SATPATHY
Hi,
It seems your question is more related to office file formats, so I have removed the unrelated tag "office-exchange-online-itpro" which is used for Exchange-online server discussion.
Thanks for your understanding.