NativeExcel for .Net Developer's Reference

ICharacters.Text Property

Returns or sets the text of the specified Characters object.

[Visual Basic]
PropertyTextAsString
[C#]
stringText{get;set;}
[C++]
__propertyString*get_Text();
__propertyvoidset_Text(String*);
[JScript]
functiongetText():String
functionsetText(String);

Example

This example changes the substring of cell B10

[C#]
book.Worksheets[1].Range["B10"].Characters[3,2].Text = "new text";
[VisualBasic]
book.Worksheets(1).Range("B10").Characters(3,2).Text = "new text"
[C++]
IRange* range = book->Worksheets->Item[1]->Range->Item[S"B10"];
range->Characters->Item[3,2]->Text = S"new text";

See Also

ICharacters Interface | NativeExcel Namespace | IRange.Characters Property