<κλάση header="doc-nav" aria-label="Πλοήγηση τεκμηρίωσης">
Τεκμηρίωση HotXLS
<κλάση nav="doc-links">
Περιεχόμενα
Αρχική
Επισκόπηση
TGridToXLS
IXLSWorkbook
<κλάση div="nav topic-quick-nav" aria-label="Topic shortcuts">
Αρχική
Περιεχόμενα
Επισκόπηση
Color ιδιότητα
<κλάση div="indent">
<κλάση div="txt">
Επιστρέφει or sets the cell shading color of the range. Use the RGB function to create a color value. Read/write LongWord
<κλάση div="txt">
Setting Color on the BIFF8 path writes the exact RGB through the XFExt $087D rich-color side record (Excel 2007+ reopens the workbook with the literal RGB) and a best-match indexed icv on the XF wire (legacy Excel 97-2003 readers see the 56-color palette approximation). The XFExt side-table is also consulted on read, so cells coming back in from Excel surface their original RGB rather than the palette approximation
<κλάση div="txt">
For theme-based addressing use the companion SetThemeColor / SetPatternThemeColor methods, which encode an Office theme idx + tint into the same XFExt slot so Excel re-tints the cell when the workbook theme palette changes. See Classic XLS color model for the overall RGB / index / theme decision tree
Σύνταξη
<κλάση div="indent">
<κλάση div="txt">
property Color: LongWord;
Παράδειγμα
<κλάση div="indent">
<κλάση div="txt">
This example sets the color of the range A1:C10 interior to red
<κλάση pre="code">
Workbook.Worksheets[1].Range['A1', 'C10'].Interior.Color := xlRed;
<κλάση footer="reference-footer">Copyright © 2010-2026 losLab Software