NativeExcel2 for .Net Developer's Reference

IInterior.Color Property

Gets or sets the cell shading color of the range as a System.Drawing.Color value.

[Visual Basic]
PropertyColorAsColor
[C#]
ColorColor{get;set;}
[C++]
__propertyColorget_Color();
__propertyvoidset_Color(Color);
[JScript]
functiongetColor():Color
functionsetColor(Color);

Property Value

System.Drawing.Color The cell shading color of the specified range.

Example

This example sets the color of the range A1:C10 interior to red.

[C#]
IInterior interior = book.Worksheets[1].Cells["A1:C10"].Interior;
interior.Color = System.Drawing.Color.Red;
[VisualBasic]
Dim interior As IInterior = book.Worksheets(1).Cells("A1:C10").Interior
interior.Color = System.Drawing.Color.Red
[C++]
IInterior* interior = book->Worksheets->Item[1].Cells->Item[S"A1:C10"]->Interior;
interior->Color = System::Drawing::Color::Red;

See Also

IInterior Interface | NativeExcel Namespace | ColorIndex Property | Interior Property