[]
ITableRow objects in a specified ITable. Each ITableRow in this collection represents a data row in the table. Use this interface to access, count, add, and delete table rows.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Name", "Value"},
{"A", 100},
{"B", 200}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
ITableRows rows = table.getRows();
int count = rows.getCount();
add()ITableRow.add(int position) voidadd(int position,
int count) voiddelete(int position,
int count) get(int index) ITableRow at the specified index.intgetCount()ITableRow objects in the collection.forEach, iterator, spliteratorITableRow at the specified index.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Name", "Score"},
{"Alice", 90},
{"Bob", 85}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
ITableRow row = table.getRows().get(0);
index - The zero-based index of the row to retrieve.ITableRow object at the specified index.ITableRow objects in the collection.Use this method to determine how many data rows are currently defined in a table.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Name", "Value"},
{"A", 100},
{"B", 200}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
int count = table.getRows().getCount();
ITableRow.ITableRow.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Name", "Value"},
{"A", 100},
{"B", 200}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
ITableRow row = table.getRows().add();
ITableRow object.The position value is zero-based and specifies the relative position of the new row within the table rows collection. If position is less than 0 or greater than or equal to the current row count, the new row is added to the end of the table.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Name", "Value"},
{"A", 100},
{"B", 200}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
ITableRow row = table.getRows().add(1);
position - A zero-based integer that specifies the relative position of the new row.ITableRow object.The new rows are inserted at the specified zero-based relative position in the table data rows. If position is less than 0 or greater than or equal to the current row count, the new rows are added to the end of the table.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Name", "Value"},
{"A", 100},
{"B", 200}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
table.getRows().add(1, 2);
position - A zero-based relative position that specifies where the new row(s) are added.count - The number of rows to add.The position value is zero-based and specifies the relative position within the table data rows. Remaining cells below the deleted rows are shifted up. If count exceeds the number of rows available from the specified position, only the remaining rows are deleted.
worksheet.getRange("A1:B4").setValue(new Object[][] {
{"Name", "Value"},
{"A", 100},
{"B", 200},
{"C", 300}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B4"), true);
table.getRows().delete(1, 2);
position - A zero-based relative position that specifies where the row deletion starts.count - The number of rows to delete.