Returns or sets the sheet tab colour shown in Excel at the bottom of the workbook window. Same encoding as
Font.Colour and
Interior.Colour: the low byte is red, the middle byte is green, the high byte is blue, the top byte is zero. Use the
RGB function to build the value. Read/write Longword.
The default value is 0, which means “automatic / no tab colour”. When the property is left at the default, HotXLS does not emit a BIFF8 SheetExt ($0862) record for the sheet and Excel shows the tab in its theme colour. Any non-zero RGB value triggers a per-sheet SheetExt record in the workbook globals stream so the colour round-trips through save/open.
The reader resolves indexed colours through the workbook palette so the application always sees a concrete RGB value, regardless of how Excel encoded the colour in the source .xls file.
Syntax
property TabColor: Longword;
Example
This example sets the first sheet's tab to green and the second sheet's tab to red, then saves the workbook.
Workbook.Worksheets[1].TabColor := RGB(0, 255, 0);
Workbook.Worksheets[2].TabColor := RGB(255, 0, 0);
Workbook.SaveAs('TabColors.xls');