NativeExcel2 for .Net Developer's Reference

IInterior Interface

Represents the interior of range of cells.

For a list of all members of this type, see IInterior Members.

[Visual Basic]
PublicInterfaceIInterior
[C#]
publicinterfaceIInterior
[C++]
public__gc__interfaceIInterior
[JScript]
publicinterfaceIInterior

Remarks

Use the Interior property to return the IInterior interface.

This example adds a crisscross pattern to the interior of cell A1 on worksheet one.

[C#]
book.Worksheets[1].Range["A1"].Interior.Pattern = XlPattern.xlPatternCrissCross;
[VisualBasic]
book.Worksheets(1).Range("A1").Interior.Pattern = XlPattern.xlPatternCrissCross
[C++]
book->Worksheets->Item[1]->Range->Item[S"A1"]->Interior->Pattern = XlPattern::xlPatternCrissCross;

This example set the fill of cells C5:F10 to solid yellow

[C#]
IInterior interior = book.Worksheets[1].Range["C5:F10"].Interior;
interior.Pattern = XlPattern.xlSolid;
interior.Color = Color.Yellow;
[VisualBasic]
Dim interior As IInterior = book.Worksheets(1).Range("C5:F10").Interior
interior.Pattern = XlPattern.xlSolid
interior.Color = Color.Yellow
[C++]
IInterior* interior = book->Worksheets->Item[1]->Range->Item[S"C5:F10"]->Interior;
interior->Pattern = XlPattern::xlSolid;
interior->Color = Color::Yellow;

Requirements

Namespace: NativeExcel

Assembly: NativeExcel (in NativeExcel.dll)

See Also

IInterior Members | NativeExcel Namespace | IRange.Interior Property