--- title: "使用Java中的列和行" --- 要更好地控制表的工作方式,请了解如何操作列和行。 ## 查找表元素索引 列,行和单元格通过其索引访问所选文档节点来管理。 查找任何节点的索引涉及从父节点收集元素类型的所有子节点,然后使用[IndexOf](https://reference.aspose.com/words/java/com.aspose.words/nodecoll...... Table table = (Table) doc.getChild(NodeType.TABLE, 0, true);...pe.TABLE, true); int tableIndex = allTables.indexOf(table); ```...