/** * Returns the row in the table with the given index * @param tableVar - table variant * @param rowIndex - row index * @return rowVariant - row Variant * @throws OleException */ public static Variant getRow(Variant tableVar, int rowIndex) throws OleException { OleAutomation tableAuto = tableAuto = tableVar.getAutomation(); OleUtils.printAutomation(tableAuto); Variant rowsVar = null; while (rowsVar == null){ rowsVar = tableAuto.getProperty(101/*Rows*/); } OleAutomation rowsAuto = rowsVar.getAutomation(); Variant rowVar = rowsAuto.invoke(0/*Item*/, new Variant[]{new Variant(rowIndex)}); return rowVar; }