forked from sheetjs/docs.sheetjs.com
28 lines
1.6 KiB
Markdown
28 lines
1.6 KiB
Markdown
|
### 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) |
|
||
|
| `D` | if true, array formula is dynamic (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.
|
||
|
|