Documentazione HotXLS

TabColor proprietà

Restituisce o sets the sheet tab color shown in Excel at the bottom of the workbook window. Same encoding as Font.Color e Interior.Color: the low byte is red, the middle byte is green, the high byte is blue, the top byte is zero. Usa the RGB funzione to build the value. Read/write Longword
The default value is 0, which means “automatic / no tab color”. When the proprietà is left at the default, HotXLS does not emit a BIFF8 SheetExt ($0862) record for the sheet e Excel shows the tab in its theme color. Any non-zero RGB value triggers a per-sheet SheetExt record in the workbook globals stream so the color round-trips through save/open
The reader resolves indexed colors through the workbook palette so the application always sees a concrete RGB value, regardless of how Excel encoded the color in the source .xls file

Sintassi

proprietà TabColor: Longword;

Esempio

This example sets the first sheet's tab to green e 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');