InsideHW.com has compared compatibility of OpenOffice and Google Docs with Microsoft Office
>> Compatibility of Office Formats
All applications save data into binary files in predefined way and order and those predefined ordered files, because of that, have characteristic file format. In purpose of easier identification, ever since DOS days, name of the file has additional three characters called file extension. In the beginning, text files were mostly saved in pure text format with DOC extension, which represented first three characters of the word document.
>> Compatibility of Office Formats