---
Product: Aspose.Cells
Platform: typescript
Page Type: reference
Canonical URL: https://reference.aspose.org/cells/typescript/Cell
---

# Cell

## Overview

`Cell` is a class in Aspose.Cells FOSS for Typescript.

Cell constructor(row, col, value?) creates a cell positioned at the given row and column, optionally initializing its value.

This class provides 8 methods for working with Cell objects in Typescript programs.
Available methods include: `constructor`, `putValue`, `setFormula`, `setHyperlink`, `setSharedStrings`, `setStyle`, `setStyleIndex`, `toXml`.
All public members are accessible to any Typescript application after installing the Aspose.Cells FOSS for Typescript package.
Properties: `col`, `formula`, `hyperlink`, `ref`, `row`, `sharedStringMap`, and 3 more.

## Description

`Cell` is a class in the Aspose.Cells FOSS library for TypeScript that exposes 7 methods and 9 properties for programmatic use.

Core capabilities include: `: map`; `cellvalue`; `string \. These operations enable developers to integrate cell functionality directly into TypeScript applications.

The class also provides the `sharedStringMap` property (gets the shared string map), the `row` property (gets the row), the `col` property (gets the col).

Instances are created through a single constructor that initializes the object with default values.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `sharedStringMap` | `: Map` | Read | Gets the shared string map. |
| `row` | `` | Read | Gets the row. |
| `col` | `` | Read | Gets the col. |
| `ref` | `` | Read | Gets the ref. |
| `value` | `CellValue` | Read/Write | Gets the value. |
| `formula` | `string \| undefined` | Read/Write | Gets the formula. |
| `style` | `Style \| undefined` | Read/Write | Gets the style. |
| `styleIndex` | `number \| undefined` | Read | Gets the style index. |
| `hyperlink` | `string \| undefined` | Read | Gets the hyperlink. |

## Methods

| Signature | Description |
|-----------|-------------|
| `setSharedStrings(strings: string[])` | Sets the shared strings value. |
| `constructor(row: number, col: number, value: CellValue)` |  |
| `putValue(value: CellValue)` | Assigns a value to the cell and returns the Cell instance, enabling method chaining |
| `setFormula(formula: string)` | Sets the formula value. |
| `setStyle(style: Style)` | Sets the style value. |
| `setStyleIndex(index: number)` | Sets the style index value. |
| `setHyperlink(url: string)` | Sets the hyperlink value. |
| `toXml()` → `string` | Generates the XML representation of the cell, including its reference, value, type, formula, style index, and hyperlink when present |

## See Also

- [Aspose.Cells — Enterprise API Reference](https://reference.aspose.com/cells/)