TableRowCollection Class
Represents a collection of Table rows, not including header and, if enabled, totals row. Supported in XLSX only.
public sealed class TableRowCollection : IEnumerable<TableRow>, IEnumerable
Public NotInheritable Class TableRowCollection
Implements IEnumerable(Of TableRow), IEnumerable
- Inheritance:
- TableRowCollection
Properties
Count
Gets the number of rows contained in the table, not including the header row and, if enabled, totals row.
Property Value
The number of rows contained in the table.
Item[Int32]
Gets the TableRow at the specified index.
public TableRow this[int index] { get; }
Public ReadOnly Property Item(index As Integer) As TableRow
Parameters
Property Value
Methods
Add()
Adds a new TableRow.
Returns
Add(Int32)
Adds the specified number of new TableRows.
public IEnumerable<TableRow> Add(int count)
Public Function Add(count As Integer) As IEnumerable(Of TableRow)
Parameters
Returns
Added TableRows.
Add(Object[])
Adds a new TableRow with the specified cell values.
public TableRow Add(object[] cellValues)
Public Function Add(cellValues As Object()) As TableRow
Parameters
cellValues
- Object[]
The values for row's cells.
Returns
GetEnumerator()
Gets the collection enumerator.
public IEnumerator<TableRow> GetEnumerator()
Public Function GetEnumerator As IEnumerator(Of TableRow)
Returns
The collection enumerator.
Insert(Int32)
Inserts a new TableRow at the specified index.
Parameters
index
- Int32
The row index.
Returns
Exceptions
- System.ArgumentOutOfRangeException
index
is out of range.
Insert(Int32, Int32)
Inserts the specified number of new TableRows at the specified index.
public IEnumerable<TableRow> Insert(int index, int count)
Public Function Insert(index As Integer, count As Integer) As IEnumerable(Of TableRow)
Parameters
index
- Int32
The row index.
count
- Int32
The number of rows to insert.
Returns
Inserted TableRows.
Exceptions
- System.ArgumentOutOfRangeException
index
is out of range or count
is less than 1.
Insert(Int32, Object[])
Inserts a new TableRow with the specified cell values.
public TableRow Insert(int index, object[] cellValues)
Public Function Insert(index As Integer, cellValues As Object()) As TableRow
Parameters
index
- Int32
The row index.
cellValues
- Object[]
The values for row's cells.
Returns
Exceptions
- System.ArgumentOutOfRangeException
index
is out of range.
Remove(TableRow)
Removes the specified TableRow.
Parameters
row
- TableRow
The table row.
Returns
Exceptions
row
is null.
RemoveAt(Int32)
Removes the row at the specified index.
Parameters
index
- Int32
The row index.
Exceptions
- System.ArgumentOutOfRangeException
index
is out of range.
RemoveAt(Int32, Int32)
Removes the specified number of rows at the specified index.
public void RemoveAt(int index, int count)
Public Sub RemoveAt(index As Integer, count As Integer)
Parameters
index
- Int32
The row index.
count
- Int32
The number of rows to remove.
Exceptions
- System.ArgumentOutOfRangeException
index
is out of range. or count
is less than 1.