Introduction
A .numbers file is a spreadsheet from
Apple Numbers, part of Apple’s iWork suite
since 2007. Unlike most spreadsheets, a Numbers sheet is a free canvas that can hold
several tables, charts, pictures and text boxes. Apple has never published the format,
so Numbers files are usually exported to XLSX,
CSV or PDF to share them.
Structure
Since the 2013 versions of iWork, a Numbers document is a ZIP archive (or a macOS
package folder) holding an Index folder of .iwa files, a
Data folder of pictures, a Metadata folder and preview
images, the same layout as an Apple Pages
document. IWA files hold Protocol Buffers messages compressed with a variant of Snappy
framing; table cells are packed into tiles of binary cell data inside them (see
Package and IWA archives, and the
message type numbers).
Versions before 2013 stored the document as XML.
Not described
Apple has never published the format. The pages follow public reverse-engineering work (the iWorkFileFormat notes and numbers-parser).
Known, not yet covered
- Reference: the protobuf field lists of most of the 586 message types (only the table, cell and style messages are laid out; the rest are listed by number and name on the message types page).
- Reference: formula syntax trees beyond the node types named, and cell storage before the version 5 layout, both handled by numbers-parser.
- Viewer: no viewer: a
.numbersfile is not unpacked, its Snappy-framed IWA files are not decompressed and no messages are decoded.
Unknown
- Reference: bytes 2 to 5 of the cell header: no public source decodes them.
Links
Software
- Apple Numbers – Apple’s spreadsheet, which makes the format (macOS, iOS, web through iCloud)
- LibreOffice Calc – free office suite’s spreadsheet, which imports some Numbers documents (Windows, macOS, Linux)
Developers
- numbers-parser – library that reads and writes Numbers documents (Python)
Reference
- iWorkFileFormat – a reverse-engineered description of the IWA format