I have been wondered following: Excel and Word are closed source product. But still, Libreoffice can write Excel and Word documents, at least to some extent. Is it true that it is not criminal to figure out how a closed source program works and implement an open source alternative to it? Or has Microsoft opened some parts of the file formats to developers?
Word and Excel files are stored in Open Office XML format1
As the name suggests, this is an open format - specifically, it’s a bunch of zipped XML text files. Change the extension of any office file to .xml and you can open them with any zip program.
However, that begs the question ...
Copyright law allows reverse engineering, particularly when the info contained in the file is your info as it is in any type of save file.