DocumentBuilderMoveToCell Method

Moves the cursor to a table cell in the current section.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.7.0


public void MoveToCell(
	int tableIndex,
	int rowIndex,
	int columnIndex,
	int characterIndex


Type: SystemInt32
The index of the table to move to.
Type: SystemInt32
The index of the row in the table.
Type: SystemInt32
The index of the column in the table.
Type: SystemInt32
The index of the character inside the cell. Currently can only specify 0 to move to the beginning of the cell or -1 to move to the end of the cell.


The navigation is performed inside the current story of the current section.

For the index parameters, when index is greater than or equal to 0, it specifies an index from the beginning with 0 being the first element. When index is less than 0, it specified an index from the end with -1 being the last element.


Shows how to move a cursor position to the specified table cell.
Document doc = new Document(MyDir + "Tables.docx");
DocumentBuilder builder = new DocumentBuilder(doc);

// Move the builder to row 3, cell 4 of the first table
builder.MoveToCell(0, 2, 3, 0);
builder.Write("\nCell contents added by DocumentBuilder");

See Also