NativeExcel2 for .Net Developer's Reference

IFont.Name Property

Returns or sets the name of the font. Read/write String.

[Visual Basic]
PropertyNameAsString
[C#]
stringName{get;set;}
[C++]
__propertyString*get_Name();
__propertyvoidset_Name(String*);
[JScript]
functiongetName():String
functionsetName(String);

Example

This example sets the font name for cells A1:C5 to Arial.

[C#]
book.Worksheets[1].Range["A1:C5"].Font.Name = "Arial";
[VisualBasic]
book.Worksheets(1).Range("A1:C5").Font.Name = "Arial"
[C++]
book->Worksheets->Item[1]->Range->Item[S"A1:C5"]->Font->Name = S"Arial";

See Also

IFont Interface | NativeExcel Namespace