接口 ITextRange


public interface ITextRange
Represents the text frame in the com.grapecity.documents.excel.IShape.
  • 方法详细资料

    • getText

      String getText()
      Gets a String value that represents the text in a text range.
    • setText

      void setText(String value)
      Sets a String value that represents the text in a text range.
    • getFont

      IFontFormat getFont()
      Returns the IFontFormat object that represents character formattingfor the IFontFormat object.
    • getParagraphs

      ITextRange getParagraphs()
      Get the paragraphs of ITextRange

      This method is only used in TextRangeType.Body; otherwise, it throws InvalidOperateExecption.

    • getRuns

      ITextRange getRuns()
      Get the runs of ITextRange

      This method is only used in TextRangeType.Paragraph; otherwise, it throws InvalidOperateExecption.

    • get

      ITextRange get(int index)
      Gets the ITextRange with the specified index.
      参数:
      index - The index.ITextRange
    • getCount

      int getCount()
      Returns the number of objects in the collection.
    • getIndex

      int getIndex()
      Returns the index in the collection.
    • getType

      TextRangeType getType()
      Returns the type of ITextRange.
    • add

      ITextRange add(String newText)
      Adds text to the specified collection.
      参数:
      newText - The new text.
      返回:
      The new ITextRange. This property is only used in Body and Paragraph. Use this property on Body and it will add a paragraph with a run. Use this property on Paragraph and it will add a run.
    • add

      ITextRange add()
      Adds text to the specified collection.
    • add

      ITextRange add(String newText, int position)
      Adds text to the specified collection.
      参数:
      newText - The new text.
      position - The position that you want to insert.
      返回:
      The new ITextRange. This property is only used in Body and Paragraph. Use this property on Body and it will add a paragraph with a run. Use this property on Paragraph and it will add a run.
    • delete

      void delete()
      Deletes from parent.