[]
com.grapecity.documents.excel.IShape.
IShape shape = worksheet.getShapes().addShape(AutoShapeType.Rectangle, 10, 10, 200, 80);
ITextRange textRange = shape.getTextFrame().getTextRange();
textRange.setText("Sales Report");
textRange.setTextAlignment(TextAlignmentAnchor.Center);
add()voiddelete()get(int index) ITextRange with the specified index.intgetCount()getFont()IFontFormat object that represents character formatting for the text range.intgetIndex()ITextRange.getRuns()ITextRange.getText()getType()ITextRange.voidvoidsetTextAlignment(TextAlignmentAnchor textAlignment)
ITextRange textRange = shape.getTextFrame().getTextRange();
textRange.setText("Sales Report");
String text = textRange.getText();
ITextRange textRange = shape.getTextFrame().getTextRange();
textRange.setText("Sales Report");
String text = textRange.getText();
value - The text to set.IFontFormat object that represents character formatting for the text range.
ITextRange textRange = shape.getTextFrame().getTextRange();
textRange.setText("Sales Report");
textRange.getFont().setBold(true);
boolean bold = textRange.getFont().getBold();
IFontFormat object that represents character formatting for the text range.ITextRange. This method is only used when the type is TextRangeType.Body; otherwise, it throws InvalidOperationException.
ITextRange body = shape.getTextFrame().getTextRange();
body.getParagraphs().add("Sales Report");
ITextRange paragraphs = body.getParagraphs();
int count = paragraphs.getCount();
ITextRange. This method is only used when the type is TextRangeType.Paragraph; otherwise, it throws InvalidOperationException.
ITextRange body = shape.getTextFrame().getTextRange();
ITextRange paragraph = body.getParagraphs().add("Sales Report");
ITextRange runs = paragraph.getRuns();
int count = runs.getCount();
ITextRange with the specified index.
ITextRange body = shape.getTextFrame().getTextRange();
body.getParagraphs().add("Sales Report");
ITextRange firstParagraph = body.getParagraphs().get(0);
index - The index. ITextRange
ITextRange body = shape.getTextFrame().getTextRange();
body.getParagraphs().add("Sales Report");
int count = body.getParagraphs().getCount();
ITextRange body = shape.getTextFrame().getTextRange();
body.getParagraphs().add("Sales Report");
ITextRange firstParagraph = body.getParagraphs().get(0);
int index = firstParagraph.getIndex();
ITextRange textRange = shape.getTextFrame().getTextRange();
textRange.setText("Sales Report");
textRange.setTextAlignment(TextAlignmentAnchor.Center);
TextAlignmentAnchor alignment = textRange.getTextAlignment();
ITextRange textRange = shape.getTextFrame().getTextRange();
textRange.setText("Sales Report");
textRange.setTextAlignment(TextAlignmentAnchor.Center);
TextAlignmentAnchor alignment = textRange.getTextAlignment();
textAlignment - The horizontal alignment for the text.ITextRange.
ITextRange textRange = shape.getTextFrame().getTextRange();
TextRangeType type = textRange.getType();
ITextRange body = shape.getTextFrame().getTextRange();
ITextRange paragraph = body.getParagraphs().add("Sales Report");
String text = paragraph.getText();
newText - The new text.ITextRange. This method is only used on body and paragraph text ranges. Calling it on a body text range adds a paragraph with a run. Calling it on a paragraph text range adds a run.
ITextRange body = shape.getTextFrame().getTextRange();
ITextRange paragraph = body.getParagraphs().add();
paragraph.setText("Sales Report");
ITextRange.
ITextRange body = shape.getTextFrame().getTextRange();
body.getParagraphs().add("First paragraph");
ITextRange insertedParagraph = body.getParagraphs().add("Title", 0);
newText - The new text.position - The position that you want to insert.ITextRange. This method is only used on body and paragraph text ranges. Calling it on a body text range adds a paragraph with a run. Calling it on a paragraph text range adds a run.
ITextRange body = shape.getTextFrame().getTextRange();
ITextRange paragraph = body.getParagraphs().add("Draft note");
paragraph.delete();