# CellStyle Interface

> CellStyle interface in the Node.js TypeScript API: Resolved whole-cell formatting. Color nulls choose automatic colors and sizes use points.

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

---

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

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

Related workbook object-model type, returned through the server control. Obtain it from its owning workbook or collection; it is not a required browser-package import.

### Members

#### Properties

| Property | Description |
|---|---|
| [bold](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/bold-property/llms-full.txt) | The bold value of CellStyle. |
| [borderEdges](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/borderedges-property/llms-full.txt) | The borderEdges value of CellStyle. |
| [borders](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/borders-property/llms-full.txt) | The borders value of CellStyle. |
| [currencyCode](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/currencycode-property/llms-full.txt) | The currencyCode value of CellStyle. |
| [decimalPlaces](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/decimalplaces-property/llms-full.txt) | The decimalPlaces value of CellStyle. |
| [fillColor](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/fillcolor-property/llms-full.txt) | The fillColor value of CellStyle. |
| [fontFamily](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/fontfamily-property/llms-full.txt) | The fontFamily value of CellStyle. |
| [fontSize](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/fontsize-property/llms-full.txt) | The fontSize value of CellStyle. |
| [format](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/format-property/llms-full.txt) | The format value of CellStyle. |
| [hiddenFormula](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/hiddenformula-property/llms-full.txt) | The hiddenFormula value of CellStyle. |
| [horizontalAlign](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/horizontalalign-property/llms-full.txt) | The horizontalAlign value of CellStyle. |
| [indent](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/indent-property/llms-full.txt) | The indent value of CellStyle. |
| [italic](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/italic-property/llms-full.txt) | The italic value of CellStyle. |
| [locked](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/locked-property/llms-full.txt) | The locked value of CellStyle. |
| [numberFormatCode](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/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/nodejs/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/nodejs/cellstyle/shrinktofit-property/llms-full.txt) | The shrinkToFit value of CellStyle. |
| [strikethrough](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/strikethrough-property/llms-full.txt) | The strikethrough value of CellStyle. |
| [textColor](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/textcolor-property/llms-full.txt) | The textColor value of CellStyle. |
| [textRotation](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/textrotation-property/llms-full.txt) | The textRotation value of CellStyle. |
| [underline](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/underline-property/llms-full.txt) | The underline value of CellStyle. |
| [verticalAlign](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/verticalalign-property/llms-full.txt) | The verticalAlign value of CellStyle. |
| [verticalText](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/verticaltext-property/llms-full.txt) | The verticalText value of CellStyle. |
| [wrapText](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/wraptext-property/llms-full.txt) | The wrapText value of CellStyle. |
| [fillPattern](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/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 { ServerSheetControl } from '@txtextcontrol/tx-sheet-control-server';

function createCellStyleReport(
    control: ServerSheetControl,
    settings: Parameters<Parameters<ServerSheetControl['workbook']['cellTypes']['register']>[1]['render']>[0]['style'],
) {
    const book = control.workbook;
    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 Node.js Server API](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/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/nodejs/cellstyle/bold-property/llms-full.txt): CellStyle.bold property in the TX Sheet Control TypeScript API for Node.js, with its syntax, its type boolean and a TypeScript example.
- [CellStyle.borderEdges Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/borderedges-property/llms-full.txt): CellStyle.borderEdges property in the TX Sheet Control TypeScript API for Node.js, with its syntax and a TypeScript example.
- [CellStyle.borders Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/borders-property/llms-full.txt): CellStyle.borders property in the TX Sheet Control TypeScript API for Node.js, with its type string and a TypeScript example.
- [CellStyle.currencyCode Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/currencycode-property/llms-full.txt): CellStyle.currencyCode property in the TX Sheet Control TypeScript API for Node.js, with its type string | null and a TypeScript example.
- [CellStyle.decimalPlaces Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/decimalplaces-property/llms-full.txt): CellStyle.decimalPlaces property in the TX Sheet Control TypeScript API for Node.js, with its type number | null and a TypeScript example.
- [CellStyle.fillColor Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/fillcolor-property/llms-full.txt): CellStyle.fillColor property in the TX Sheet Control TypeScript API for Node.js, with its type string | null and a TypeScript example.
- [CellStyle.fillPattern Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/fillpattern-property/llms-full.txt): CellStyle.fillPattern property in the TX Sheet Control TypeScript API for Node.js, with its type CellStyle['fillPattern'] and a TypeScript example.
- [CellStyle.fontFamily Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/fontfamily-property/llms-full.txt): CellStyle.fontFamily property in the TX Sheet Control TypeScript API for Node.js, with its type string and a TypeScript example.
- [CellStyle.fontSize Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/fontsize-property/llms-full.txt): CellStyle.fontSize property in the TX Sheet Control TypeScript API for Node.js, with its type number and a TypeScript example.
- [CellStyle.format Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/format-property/llms-full.txt): CellStyle.format property in the TX Sheet Control TypeScript API for Node.js, with its syntax, a TypeScript example and remarks on handles and validation.
- [CellStyle.hiddenFormula Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/hiddenformula-property/llms-full.txt): CellStyle.hiddenFormula property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [CellStyle.horizontalAlign Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/horizontalalign-property/llms-full.txt): CellStyle.horizontalAlign property in the Node.js 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/nodejs/cellstyle/indent-property/llms-full.txt): CellStyle.indent property in the TX Sheet Control TypeScript API for Node.js, with its type number and a TypeScript example.
- [CellStyle.italic Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/italic-property/llms-full.txt): CellStyle.italic property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [CellStyle.locked Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/locked-property/llms-full.txt): CellStyle.locked property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [CellStyle.numberFormatCode Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/numberformatcode-property/llms-full.txt): CellStyle.numberFormatCode property in the TX Sheet Control TypeScript API for Node.js: Native Excel format code, up to 255 characters.
- [CellStyle.numberLocale Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/numberlocale-property/llms-full.txt): CellStyle.numberLocale property in the TX Sheet Control TypeScript API for Node.js: BCP 47 display locale; null uses the workbook's number locale.
- [CellStyle.shrinkToFit Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/shrinktofit-property/llms-full.txt): CellStyle.shrinkToFit property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [CellStyle.strikethrough Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/strikethrough-property/llms-full.txt): CellStyle.strikethrough property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [CellStyle.textColor Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/textcolor-property/llms-full.txt): CellStyle.textColor property in the TX Sheet Control TypeScript API for Node.js, with its type string | null and a TypeScript example.
- [CellStyle.textRotation Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/textrotation-property/llms-full.txt): CellStyle.textRotation property in the TX Sheet Control TypeScript API for Node.js, with its type number and a TypeScript example.
- [CellStyle.underline Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/underline-property/llms-full.txt): CellStyle.underline property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [CellStyle.verticalAlign Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/verticalalign-property/llms-full.txt): CellStyle.verticalAlign property in the TX Sheet Control TypeScript API for Node.js, with its type "top" | "middle" | "bottom" and a TypeScript example.
- [CellStyle.verticalText Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/verticaltext-property/llms-full.txt): CellStyle.verticalText property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [CellStyle.wrapText Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/cellstyle/wraptext-property/llms-full.txt): CellStyle.wrapText property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.

---

## Nearby

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