NativeExcel for .Net Developer's Reference

IFont.Italic Property

Gets or sets a value that indicates whether the font style is italic.

[Visual Basic]
PropertyItalicAsBoolean
[C#]
boolItalic{get;set;}
[C++]
__propertyboolget_Italic();
__propertyvoidset_Italic(bool);
[JScript]
functiongetItalic():bool
functionsetItalic(bool);

Property Value

true if the font style is italic; otherwise, false.

Example

This example sets the font style to italic for the range A1:A5 on sheet one.

[C#]
book.Worksheets[1].Range["A1:A5"].Font.Italic = true;
[VisualBasic]
book.Worksheets(1).Range("A1:A5").Font.Italic = true
[C++]
book->Worksheets->Item[1]->Range->Item[S"A1:A5"]->Font->Italic = true;

See Also

IFont Interface | NativeExcel Namespace