NativeExcel for .Net Developer's Reference

IFont.Name Property

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

[Visual Basic]
Property Name As String
[C#]
string Name { get; set; }
[C++]
__property String* get_Name();
__property void set_Name(String* );
[JScript]
function get Name() : String
function set Name(String);

Example

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

[C#]
book.Worksheets[1].Range["A1:C5"].Font.Name = "Arial";
[Visual Basic]
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