Appearance
@shbernal/pptxgenjs / index / TableStyleProps
Interface: TableStyleProps
Defined in: core-interfaces.ts:1469
A reusable custom table style written to ppt/tableStyles.xml. Pass to pptx.defineTableStyle(), which registers it and returns a GUID to use as TableProps.tableStyle. Unlike the fixed built-in TableStyle set, a custom style can use arbitrary brand colors, is editable in PowerPoint's Table Styles gallery, and bands correctly across any row/column count (including auto-paged tables).
Example
ts
const brand = pptx.defineTableStyle({
name: 'Brand Banded',
wholeTbl: { border: { type:'solid', color:'D9D9D9', width:0.5 } },
firstRow: { fill:'1A2B3C', color:'FFFFFF', bold:true },
band1H: { fill:'EAF1F8' },
band2H: { fill:'FFFFFF' },
})
slide.addTable(rows, { tableStyle: brand, hasHeader:true, hasBandedRows:true })Properties
band1H?
optionalband1H?:TableStyleRegionProps
Defined in: core-interfaces.ts:1483
Odd horizontal band — activated by TableProps.hasBandedRows.
band1V?
optionalband1V?:TableStyleRegionProps
Defined in: core-interfaces.ts:1487
Odd vertical band — activated by TableProps.hasBandedColumns.
band2H?
optionalband2H?:TableStyleRegionProps
Defined in: core-interfaces.ts:1485
Even horizontal band — activated by TableProps.hasBandedRows.
band2V?
optionalband2V?:TableStyleRegionProps
Defined in: core-interfaces.ts:1489
Even vertical band — activated by TableProps.hasBandedColumns.
firstCol?
optionalfirstCol?:TableStyleRegionProps
Defined in: core-interfaces.ts:1479
First column — activated by TableProps.hasFirstColumn.
firstRow?
optionalfirstRow?:TableStyleRegionProps
Defined in: core-interfaces.ts:1475
Header (first) row — activated by TableProps.hasHeader.
lastCol?
optionallastCol?:TableStyleRegionProps
Defined in: core-interfaces.ts:1481
Last column — activated by TableProps.hasLastColumn.
lastRow?
optionallastRow?:TableStyleRegionProps
Defined in: core-interfaces.ts:1477
Footer (last) row — activated by TableProps.hasFooter.
name
name:
string
Defined in: core-interfaces.ts:1471
Display name shown in PowerPoint's Table Styles gallery.
wholeTbl?
optionalwholeTbl?:TableStyleRegionProps
Defined in: core-interfaces.ts:1473
Base styling applied to every cell.