TX Sheet Control

CellStyle.fillPattern Property

Property

Hatch foreground over the cell background. Set null to remove the pattern. The same clipped vector geometry is used by the editor and PDF.

Owner: CellStyle. Package: @txtextcontrol/tx-sheet-control. Version: 2.0.0.

Syntax

fillPattern?: CellStyle['fillPattern']

Pattern Settings

type accepts darkDown, darkUp, darkHorizontal, darkVertical, darkGrid, darkTrellis, their light variants, darkGray, mediumGray, lightGray, gray125 and gray0625. color is a six-digit RGB foreground. fillColor supplies the background. Invalid types and colors throw before the edit commits. Patterns are retained in XLSX, TXWB and ODS.

Editor Controls

The Format Cells dialog exposes the same value through Pattern Style and Pattern Color in Fill. The reusable Cell Style dialog and custom conditional formats use the same pattern choices. Choose None to remove the pattern while retaining the background.

Examples

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

function configureReport(book: Workbook) {
    const sheet = book.sheets.at(0);
    sheet.cell('B3').setText('Planned activity');
    sheet.cell('B3').format({ fillColor: '#ffffff', fillPattern: { type: 'lightUp', color: '#735773' } });
    return sheet;
}