# CellStyle Interface

> CellStyle interface in the TX Sheet Control TypeScript API for the browser, with 25 properties and a TypeScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > CellStyle Interface
- **1336 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/llms-full.txt

---

Resolved whole-cell formatting. Color nulls choose automatic colors and sizes use points.

Package: `@txtextcontrol/tx-sheet-control`. Version: **2.0.0**.

Type-only declaration; it is not a JavaScript runtime constructor.

### Members

#### Properties

| Property | Description |
|---|---|
| [bold](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/bold-property/llms-full.txt) | The bold value of CellStyle. |
| [borderEdges](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/borderedges-property/llms-full.txt) | The borderEdges value of CellStyle. |
| [borders](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/borders-property/llms-full.txt) | The borders value of CellStyle. |
| [currencyCode](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/currencycode-property/llms-full.txt) | The currencyCode value of CellStyle. |
| [decimalPlaces](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/decimalplaces-property/llms-full.txt) | The decimalPlaces value of CellStyle. |
| [fillColor](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/fillcolor-property/llms-full.txt) | The fillColor value of CellStyle. |
| [fontFamily](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/fontfamily-property/llms-full.txt) | The fontFamily value of CellStyle. |
| [fontSize](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/fontsize-property/llms-full.txt) | The fontSize value of CellStyle. |
| [format](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/format-property/llms-full.txt) | The format value of CellStyle. |
| [hiddenFormula](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/hiddenformula-property/llms-full.txt) | The hiddenFormula value of CellStyle. |
| [horizontalAlign](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/horizontalalign-property/llms-full.txt) | The horizontalAlign value of CellStyle. |
| [indent](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/indent-property/llms-full.txt) | The indent value of CellStyle. |
| [italic](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/italic-property/llms-full.txt) | The italic value of CellStyle. |
| [locked](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/locked-property/llms-full.txt) | The locked value of CellStyle. |
| [numberFormatCode](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/numberformatcode-property/llms-full.txt) | Native Excel format code, up to 255 characters; null uses category defaults. |
| [numberLocale](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/numberlocale-property/llms-full.txt) | BCP 47 display locale; null uses the workbook's number locale. |
| [shrinkToFit](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/shrinktofit-property/llms-full.txt) | The shrinkToFit value of CellStyle. |
| [strikethrough](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/strikethrough-property/llms-full.txt) | The strikethrough value of CellStyle. |
| [textColor](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/textcolor-property/llms-full.txt) | The textColor value of CellStyle. |
| [textRotation](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/textrotation-property/llms-full.txt) | The textRotation value of CellStyle. |
| [underline](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/underline-property/llms-full.txt) | The underline value of CellStyle. |
| [verticalAlign](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/verticalalign-property/llms-full.txt) | The verticalAlign value of CellStyle. |
| [verticalText](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/verticaltext-property/llms-full.txt) | The verticalText value of CellStyle. |
| [wrapText](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/wraptext-property/llms-full.txt) | The wrapText value of CellStyle. |
| [fillPattern](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/fillpattern-property/llms-full.txt) | Hatch foreground over the cell background. |

### Examples

Use a fresh workbook. Create and format the sample data, apply this API and retain the returned document or result in your application. In the browser pass editor.workbook; in Node.js pass the server control.

```typescript
import type { Workbook } from '@txtextcontrol/tx-sheet-control';
import type { CellStyle } from '@txtextcontrol/tx-sheet-control';

function createCellStyleReport(book: Workbook, settings: CellStyle) {
    const sheet = book.sheets.at(0);
    sheet.cell('A1').setText('October invoice');
    sheet
        .cell('A1')
        .format({
            fontFamily: 'Liberation Sans',
            fontSize: 16,
            bold: true,
            textColor: '#ffffff',
            fillColor: '#163b63',
        });

    sheet.columns.at(0).setWidth({ pixels: 240 });
    sheet.range('B8:B9').setValues([[120], [80]]);
    sheet.cell('B10').setFormula('=SUM(B8:B9)');
    sheet.range('B8:B10').format({ numberFormatCode: '#,##0.00', fontSize: 11 });
    sheet.cell('A1').format({ ...settings });
    return sheet;
}
```

### See Also

- [TypeScript Browser Editor API](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/llms-full.txt)
- [Formatting and Number Display](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formatting/llms-full.txt)

---

## In This Section

- [CellStyle.bold Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/bold-property/llms-full.txt): CellStyle.bold property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [CellStyle.borderEdges Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/borderedges-property/llms-full.txt): CellStyle.borderEdges property in the TX Sheet Control TypeScript API for the browser, with its syntax and a TypeScript example.
- [CellStyle.borders Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/borders-property/llms-full.txt): CellStyle.borders property in the TX Sheet Control TypeScript API for the browser, with its type string and a TypeScript example.
- [CellStyle.currencyCode Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/currencycode-property/llms-full.txt): CellStyle.currencyCode property in the TX Sheet Control TypeScript API for the browser, with its type string | null and a TypeScript example.
- [CellStyle.decimalPlaces Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/decimalplaces-property/llms-full.txt): CellStyle.decimalPlaces property in the TX Sheet Control TypeScript API for the browser, with its type number | null and a TypeScript example.
- [CellStyle.fillColor Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/fillcolor-property/llms-full.txt): CellStyle.fillColor property in the TX Sheet Control TypeScript API for the browser, with its type string | null and a TypeScript example.
- [CellStyle.fillPattern Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/fillpattern-property/llms-full.txt): CellStyle.fillPattern property in the TX Sheet Control TypeScript API for the browser, with its type CellStyle['fillPattern'] and a TypeScript example.
- [CellStyle.fontFamily Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/fontfamily-property/llms-full.txt): CellStyle.fontFamily property in the TX Sheet Control TypeScript API for the browser, with its type string and a TypeScript example.
- [CellStyle.fontSize Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/fontsize-property/llms-full.txt): CellStyle.fontSize property in the TX Sheet Control TypeScript API for the browser, with its type number and a TypeScript example.
- [CellStyle.format Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/format-property/llms-full.txt): CellStyle.format property in the TX Sheet Control TypeScript API for the browser, with its syntax and a TypeScript example.
- [CellStyle.hiddenFormula Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/hiddenformula-property/llms-full.txt): CellStyle.hiddenFormula property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [CellStyle.horizontalAlign Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/horizontalalign-property/llms-full.txt): CellStyle.horizontalAlign property in the browser TypeScript API, with its type "left" | "center" | "right" | "general" and a TypeScript example.
- [CellStyle.indent Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/indent-property/llms-full.txt): CellStyle.indent property in the TX Sheet Control TypeScript API for the browser, with its type number and a TypeScript example.
- [CellStyle.italic Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/italic-property/llms-full.txt): CellStyle.italic property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [CellStyle.locked Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/locked-property/llms-full.txt): CellStyle.locked property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [CellStyle.numberFormatCode Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/numberformatcode-property/llms-full.txt): CellStyle.numberFormatCode property in the TX Sheet Control TypeScript API for the browser: Native Excel format code, up to 255 characters.
- [CellStyle.numberLocale Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/numberlocale-property/llms-full.txt): CellStyle.numberLocale property in the TX Sheet Control TypeScript API for the browser: BCP 47 display locale; null uses the workbook's number locale.
- [CellStyle.shrinkToFit Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/shrinktofit-property/llms-full.txt): CellStyle.shrinkToFit property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [CellStyle.strikethrough Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/strikethrough-property/llms-full.txt): CellStyle.strikethrough property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [CellStyle.textColor Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/textcolor-property/llms-full.txt): CellStyle.textColor property in the TX Sheet Control TypeScript API for the browser, with its type string | null and a TypeScript example.
- [CellStyle.textRotation Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/textrotation-property/llms-full.txt): CellStyle.textRotation property in the TX Sheet Control TypeScript API for the browser, with its type number and a TypeScript example.
- [CellStyle.underline Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/underline-property/llms-full.txt): CellStyle.underline property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [CellStyle.verticalAlign Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/verticalalign-property/llms-full.txt): CellStyle.verticalAlign property in the TX Sheet Control TypeScript API for the browser, with its type "top" | "middle" | "bottom" and a TypeScript example.
- [CellStyle.verticalText Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/verticaltext-property/llms-full.txt): CellStyle.verticalText property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [CellStyle.wrapText Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/wraptext-property/llms-full.txt): CellStyle.wrapText property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.

---

## Nearby

- **Previous:** [CellRenderContext.width Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellrendercontext/width-property/llms-full.txt)
- **Next:** [CellStyle.bold Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/cellstyle/bold-property/llms-full.txt)
