CellStyle.fillPattern 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-server. 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.
Examples
import type { ServerSheetControl } from '@txtextcontrol/tx-sheet-control-server';
function configureReport(control: ServerSheetControl) {
const book = control.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;
}