NativeExcel for .Net Developer's Reference

ICharacters.Count Property

Returns the number of characters in the specified Characters object.

[Visual Basic]
PropertyReadOnlyCountAsInteger
[C#]
intCount{get;}
[C++]
__propertyintget_Count();
[JScript]
functiongetCount():int

Example

This example sets the font size to 14 for the last character in the cell B2.

[C#]
    IRange r = book.Worksheets[1].Range["B2"];
    int n = r.Characters.Count;
    r.Characters[n,1].Font.Size = 14;
[VisualBasic]
    Dim r As IRange book.Worksheets(1).Range("B2")
    Dim n As Integer = r.Characters.Count
    r.Characters(n,1).Font.Size = 14
[C++]
 IRange* r = book->Worksheets->Item[1]->Range->Item[S"B2"];
 int n = r->Characters->Count;
 r->Characters->Item[n,1]->Font->Size = 14; 

See Also

ICharacters Interface | NativeExcel Namespace | IRange.Characters Property