sheetjs/docbits/51_cell.md
SheetJS 19620da30b version bump 0.12.1: BIFF5 features
- BIFF5 write number formats and other features
- XLSX/XLSB/BIFF8 Suppress "Number stored as Text" errors
- codename awareness (fixes #992 h/t @samusstrike)
- updated CFB to 1.0.3
- demo refresh
2018-02-14 15:06:35 -05:00

1.6 KiB

Cell Object

Cell objects are plain JS objects with keys and values following the convention:

Key Description
v raw value (see Data Types section for more info)
w formatted text (if applicable)
t type: b Boolean, e Error, n Number, d Date, s Text, z Stub
f cell formula encoded as an A1-style string (if applicable)
F range of enclosing array if formula is array formula (if applicable)
r rich text encoding (if applicable)
h HTML rendering of the rich text (if applicable)
c comments associated with the cell
z number format string associated with the cell (if requested)
l cell hyperlink object (.Target holds link, .Tooltip is tooltip)
s the style/theme of the cell (if applicable)

Built-in export utilities (such as the CSV exporter) will use the w text if it is available. To change a value, be sure to delete cell.w (or set it to undefined) before attempting to export. The utilities will regenerate the w text from the number format (cell.z) and the raw value if possible.

The actual array formula is stored in the f field of the first cell in the array range. Other cells in the range will omit the f field.