Anyone know of a way to unpack a ods file and read the contents.xml file?

In my program I'd like to be able to open my ods file, and extract the xml file for parsing.

Ive looked at minizip, but this is a ods file not a zip file. Is there any other way?

Any help is appreciated, thanks alot, Bryan

有帮助吗?

解决方案

Despite the file extension it is still a zip archive, so minizip should work.

The original OpenDocument format consists of an XML document that has as its root element. OpenDocument files can also take the format of a ZIP compressed archive containing a number of files and directories; these can contain binary content and benefit from ZIP's lossless compression to reduce file size.

Source

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top