[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ITableRows

ITableRows Interface

Represents the collection of all 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.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public interface ITableRows : IEnumerable
Public Interface ITableRows
    Inherits IEnumerable
Examples
worksheet.Range["A1:B3"].Value = new object[,] {
    {"Name", "Value"},
    {"A", 100},
    {"B", 200}
};
ITable table = worksheet.Tables.Add(worksheet.Range["A1:B3"], true);
ITableRows rows = table.Rows;
int count = rows.Count;

Properties

Name Description
Count

Gets the number of ITableRow objects in the collection.

Use this property to determine how many data rows are currently defined in a table.

this[int]

Gets the ITableRow object at the specified index.

Methods

Name Description
Add(int)

Adds a new row to the table and returns the newly added ITableRow object.

Add(int, int)

Adds one or more rows to the table at the specified relative position.

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.

Delete(int, int)

Deletes one or more rows from the table.

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.