The Gnumeric file format is based on the eXtensible Markup Language (XML) and is used as the default file format.
Gnumeric is currently using two different systems to process XML.
The newer system is based on the SAX processing method for XML and is substantially faster than the older method. This code is based in a plugin module. The exporter is currently used by default but the importer is still incomplete.
The older system is part of the core Gnumeric program and is still used to open files in the Gnumeric format.
| Name: | The Gnumeric file format |
| Extensions: | .gnumeric |
| Compatible Programs: | Gnumeric |
| Open / Save: | Both |
This is the default file format and therefore has the best support of all the formats available. Every feature that can be created in the spreadsheet should be savable using this format.
The Gnumeric file format is handled using two different code bases. The older version is part of the application itself. The newer version is in a plugin called "EXPERIMENTAL SAX based XML" because the parser is based on SAX.
The Gnumeric file format stores the file contents in the eXtensible Markup Language (XML) and compresses the file using the GNU project's gzip compression library.
The Gnumeric file format is designed to be flexible and powerful. The format is easily processed by computers. The format can readily be improved as gnumeric develops without breaking compatibility with older versions. The format is designed to be easily translated into text so that it can be read by humans.
Gnumeric automatically recognizes the version of the file format of any file saved since this format is contained in the file header. The table below is for information purposes only.
| XML File Format Version | Gnumeric Version |
|---|---|
| 1 | |
| 2 | |
| 3 | Since 0.52 |
| 4 | Since 0.57 |
| 5 | Since 0.58 |
| 6 | Since 0.62 |
| 7 | Since 0.66 |
| 8 | Since 0.71 |
| 9 | Since 0.73 |
| 10 | Since 1.03 |
An outdated PDF document discussing the Gnumeric file format which should provide a useful starting point was developed by the JWorkbook project. The file can be downloaded from http://www.jfree.org/jworkbook/gnumeric-xml.pdf.
An outdated PDF document discussing the Gnumeric file format which should provide a useful starting point was developed by the JWorkbook project. The file can be downloaded from http://www.jfree.org/jworkbook/download/gnumeric-xml.pdf.
Direct manipulation of Gnumeric files is possible by transforming the files to text files and then using standard text file tools like document editors. In order to read the contents a Gnumeric file must first be decompressed and can then be opened. In GNU systems, the Gnumeric default file "Book1.gnumeric" can be uncompressed as follows:
zcat Book1.gnumeric > Book1.text
cp Book1.gnumeric Book1.text.gz gunzip Book1.text.gz
XML manipulation tools can be used to transform Gnumeric files and access the data they contain, since the file format is XML. The file can be validated by an XML Schema Definition (XSD) . These are available via the Internet at http://git.gnome.org/cgit/gnumeric/plain/gnumeric.xsd.
The Java™ Language can be used to create, access, or manipulate Gnumeric format files using the JWorkbook project library. See the project's website for details.
The C# language, through the mono implementation can also be used to manipulate Gnumeric format files.