[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.ITextRange

ITextRange Interface

Represents the text frame in the IShape.

Namespace: GrapeCity.Documents.Excel.Drawing
Assembly: DS.Documents.Excel.dll
Syntax
public interface ITextRange : IEnumerable
Public Interface ITextRange
    Inherits IEnumerable
Examples
IShape shape = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 10, 10, 200, 80);
ITextRange textRange = shape.TextFrame.TextRange;
textRange.Text = "Sales Report";
textRange.TextAlignment = TextAlignmentAnchor.Center;

Properties

Name Description
Count

Gets the number of objects in the collection.

Font

Gets the IFontFormat object that represents character formatting for the text range.

Index

Gets the index in the collection.

this[int]

Gets the ITextRange with the specified index.

Paragraphs

Gets the paragraphs of ITextRange.

This property is only used when Type is Body; otherwise, it throws InvalidOperationException.

Runs

Gets the runs of ITextRange.

This property is only used when Type is Paragraph; otherwise, it throws InvalidOperationException.

Text

Gets or sets a String value that represents the text in a text range (read/write).

TextAlignment

Gets or sets the horizontal alignment of the text.

Type

Gets the type of ITextRange, such as Body, Paragraph, or Run.

Methods

Name Description
Add(string, int)

Adds text to the specified collection.

This method is only used when Type is Body or Paragraph. Calling it on a body text range adds a paragraph with a run. Calling it on a paragraph text range adds a run.

Delete()

Deletes from parent.