> For the complete documentation index, see [llms.txt](https://docs.rowsncolumns.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rowsncolumns.app/configuration/api/sheetcell.md).

# SheetCell

### How to use SheetCell

{% code overflow="wrap" %}

```tsx
import { SheetCell } from "@rowsncolumns/spreadsheet-state"

const sheetCell = new SheetCell()

// Extend if necessary from existing cellData
const existingCellData = {}
sheetCell.assign(sheetId, { rowIndex, columnIndex }, existingCellData) 

// Set user entered value
sheetCell.setUserEnteredValue("$20")

// Get cell data
const cellData = sheetCell.getCellData()
```

{% endcode %}

CellData is the cell representation used in Spreadsheet 2. Short-form keys (`ue` / `ev` / `uf` / `fv`) are preferred for new writes — see [Cell Data](/configuration/api/cell-data.md) for the full type. The same short-form convention applies inside `ExtendedValue`: `nv` (number), `sv` (string), `bv` (bool), `fv` (formula), `ev` (error).

```json
{
    "ue": {
        "sv": "20"
    },
    "ev": {
        "nv": 20
    },
    "fv": "$20",
    "uf": {
        "numberFormat": {
            "type": "CURRENCY",
            "pattern": "\"$\"#,##0"
        }
    }
}
```

{% hint style="info" %}
`effectiveFormat` / `ef` are no longer written on `CellData`. The renderer derives the effective format on the fly from `uf`, the cell value, and (for formula cells) precedent formats. Older saved data with `effectiveFormat` still loads.
{% endhint %}
