NativeExcel2 for .Net Developer's Reference

IWorkbook.Colors Property

Returns an IPalette interface that represents the color palette of the specified workbook.

[Visual Basic]
PropertyReadOnlyColorsAsIPalette
[C#]
IPaletteColors{get;}
[C++]
__propertyIPalette*get_Colors();
[JScript]
functiongetColors():IPalette

Property Value

IPalette interface.

Example

This example changes color ten in the color palette for the workbook.

[C#]
book.Colors[10] = System.Drawing.Color.FromArgb(200, 100, 100);
[VisualBasic]
book.Colors(10) = System.Drawing.Color.FromArgb(200, 100, 100)
[C++]
book->Colors->Item[10] = System::Drawing::Color::FromArgb(200, 100, 100);

See Also

IWorkbook Interface | NativeExcel Namespace | IPalette Interface