Class ExcelTableRowCollection
A collection of ExcelTableRows.
Inheritance
Inherited Members
Namespace: OfficeOpenXml.Table
Assembly: EPPlus.dll
Syntax
public class ExcelTableRowCollection : IEnumerable<ExcelTableRow>, IEnumerable
Properties
Item[Int32]
Returns a table row
Declaration
public ExcelTableRow this[int ix] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | ix | 0-based index |
Property Value
Type | Description |
---|---|
ExcelTableRow | The ExcelTableRow that corresponds to the |
Methods
AddNewRow(Boolean)
Add a new empty row at the bottom the table.
Declaration
public ExcelTableRow AddNewRow(bool copyStyles = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | copyStyles | Indicates whether styles should be copied to the new row. Default is true. |
Returns
Type | Description |
---|---|
ExcelTableRow | The added ExcelTableRow |
AddNewRows(Int32, Boolean)
Add a number of new empty rows at the bottom the table.
Declaration
public IEnumerable<ExcelTableRow> AddNewRows(int nRows, bool copyStyles = true)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nRows | Number of rows to add |
System.Boolean | copyStyles | Indicates whether styles should be copied to the new row. Default is true. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ExcelTableRow> | The added rows |
Clear()
Clears/deletes all data in the table's rows.
Declaration
public void Clear()
DeleteRows(Int32, Int32)
Deletes the specified number of rows at the given position in the table
Declaration
public void DeleteRows(int position, int numberOfRows = 1)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | position | 0-based position of the deletion |
System.Int32 | numberOfRows | Number of rows to delete |
GetEnumerator()
Returns an iterator
Declaration
public IEnumerator<ExcelTableRow> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<ExcelTableRow> |
InsertNewRow(Int32, Boolean)
Inserts a new empty row at the specified position.
Declaration
public ExcelTableRow InsertNewRow(int position, bool copyStyles = true)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | position | 0-based position where the new row should be added |
System.Boolean | copyStyles | Indicates whether styles should be copied to the new row. Default is true. |
Returns
Type | Description |
---|---|
ExcelTableRow |
InsertNewRows(Int32, Int32, Boolean)
Inserts one or more new empty rows at the specified position.
Declaration
public IEnumerable<ExcelTableRow> InsertNewRows(int position, int nRows = 1, bool copyStyles = true)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | position | 0-based position where the new rows should be added |
System.Int32 | nRows | Number of new rows to insert |
System.Boolean | copyStyles | Indicates whether styles should be copied to the new row. Default is true. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ExcelTableRow> |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |