Show / Hide Table of Contents

Class ExcelTableRowCollection

A collection of ExcelTableRows.

Inheritance
object
ExcelTableRowCollection
Implements
IEnumerable<ExcelTableRow>
IEnumerable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: OfficeOpenXml.Table
Assembly: EPPlus.dll
Syntax
public class ExcelTableRowCollection : IEnumerable<ExcelTableRow>, IEnumerable

Properties

this[int]

Returns a table row

Declaration
public ExcelTableRow this[int ix] { get; }
Parameters
Type Name Description
int ix

0-based index

Property Value
Type Description
ExcelTableRow

The ExcelTableRow that corresponds to the ix

Methods

AddNewRow(bool)

Add a new empty row at the bottom the table.

Declaration
public ExcelTableRow AddNewRow(bool copyStyles = true)
Parameters
Type Name Description
bool copyStyles

Indicates whether styles should be copied to the new row. Default is true.

Returns
Type Description
ExcelTableRow

The added ExcelTableRow

AddNewRows(int, bool)

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
int nRows

Number of rows to add

bool copyStyles

Indicates whether styles should be copied to the new row. Default is true.

Returns
Type Description
IEnumerable<ExcelTableRow>

The added rows

Clear()

Clears/deletes all data in the table's rows.

Declaration
public void Clear()

DeleteRows(int, int)

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
int position

0-based position of the deletion

int numberOfRows

Number of rows to delete

GetEnumerator()

Returns an iterator

Declaration
public IEnumerator<ExcelTableRow> GetEnumerator()
Returns
Type Description
IEnumerator<ExcelTableRow>

InsertNewRow(int, bool)

Inserts a new empty row at the specified position.

Declaration
public ExcelTableRow InsertNewRow(int position, bool copyStyles = true)
Parameters
Type Name Description
int position

0-based position where the new row should be added

bool copyStyles

Indicates whether styles should be copied to the new row. Default is true.

Returns
Type Description
ExcelTableRow

InsertNewRows(int, int, bool)

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
int position

0-based position where the new rows should be added

int nRows

Number of new rows to insert

bool copyStyles

Indicates whether styles should be copied to the new row. Default is true.

Returns
Type Description
IEnumerable<ExcelTableRow>

Implements

IEnumerable<T>
IEnumerable
In this article
Back to top Generated by DocFX