SpreadsheetML

A SpreadsheetML document is described at the top level by a workbook part. The workbook part is the target of the package relationship whose type is:

http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument

The workbook part stores information about the workbook and its structure, such as file version, creating application, and password to modify. Logically, the workbook contains one or more sheets (§3:3.2); physically, each sheet is stored in its own part and is referenced in the usual manner from the workbook part. Each sheet can be a worksheet, a chart sheet, or a dialog sheet. We will discuss only the worksheet, which is the most common type. Within a worksheet object, a typical path from root to leaf in the XML tree would comprise these XML elements:

  • worksheet – the root element in a worksheet (§3:3.2).

  • sheetData – the cell table, which represents every non-empty cell in the worksheet (§3:3.2.4).

  • row – one row of cells in the cell table (§3:2.8).

  • c – one cell (§3:3.2.9). The r attribute indicates the cell’s location using A1-style coordinates. The cell can also have a style identifier (attribute s) and a data type (attribute t).

  • v and f –the value (§3:3.2.9.1) and optional formula (§3:3.2.9.2) of the cell. If a cell has a formula, then the value is the result of the most recent calculation.

Both strings and formulas are stored in shared tables (§3:3.3 and §3:3.2.9.2.1) to avoid redundant storage and speed loads and saves.