I\'m trying to create an Open Office spreadsheet programmatically but for some reason simply compressing a folder with all the necessary files makes Open Office flag the fil
Documentation here. This steps worked for me:
Uncompress the original document file (it's a normal zip file) to some directory:
$ mkdir document
$ cd document
$ unzip ../document.odt
Modify the uncompressed data.
Create a new odt:
$ zip -0 -X ../document2.odt mimetype
$ zip -r ../document2.odt * -x mimetype