Skip to content

Class ExcelTableRow

Namespace: OfficeOpenXml.Table
Assembly: EPPlus.dll

Represents a row in an ExcelTable

public class ExcelTableRow

Inheritance

object ← ExcelTableRow

Inherited Members

object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()

Properties

ColumnCount

Number of columns

public int ColumnCount { get; }

Property Value

int

IsDeleted

Indicates if this row has been deleted.

public bool IsDeleted { get; }

Property Value

bool

IsEmpty

Returns true if every cell in the row has null values

public bool IsEmpty { get; }

Property Value

bool

IsHidden

Returns true if the entire row is hidden

public bool IsHidden { get; }

Property Value

bool

RowRange

An ExcelRangeBase representing the row from first to last cell

public ExcelRangeBase RowRange { get; }

Property Value

ExcelRangeBase

Methods

Clear()

Clear all cell values in the row's range.

public ExcelTableRow Clear()

Returns

ExcelTableRow

Delete()

Removes this row from the table

public void Delete()

GetFormula(string)

Returns formula by column name.

public string GetFormula(string columnName)

Parameters

columnName string

Returns

string

GetFormula(int)

Returns formula by 0-based column index

public string GetFormula(int offsetIndex)

Parameters

offsetIndex int

Returns

string

GetValue<T>(string)

Returns cell value by column name

public T GetValue<T>(string columnName)

Parameters

columnName string

Returns

T

Type Parameters

T

Cell value type

Exceptions

InvalidOperationException

If the row has previously been deleted.

GetValue(string)

Returns cell value by column name

public object GetValue(string columnName)

Parameters

columnName string

Returns

object

Exceptions

InvalidOperationException

If the row has previously been deleted.

GetValue<T>(int)

Returns cell value by column index

public T GetValue<T>(int offsetIndex)

Parameters

offsetIndex int

0-based column index

Returns

T

Type Parameters

T

Cell value type

Exceptions

InvalidOperationException

If the row has previously been deleted.

GetValue(int)

Returns cell value by column index

public object GetValue(int offsetIndex)

Parameters

offsetIndex int

0-based column index

Returns

object

Exceptions

InvalidOperationException

If the row has previously been deleted.

SetValue(string, object)

Set a cell value by column name

public ExcelTableRow SetValue(string columnName, object value)

Parameters

columnName string

The table column name

value object

The table cell value

Returns

ExcelTableRow

Exceptions

InvalidOperationException

If the row has previously been deleted.

SetValue(int, object)

Set a cell value by column index

public ExcelTableRow SetValue(int offsetIndex, object value)

Parameters

offsetIndex int

0-based column index

value object

The table cell value

Returns

ExcelTableRow

Exceptions

InvalidOperationException

If the row has previously been deleted.

SetValues(params object[])

Set all the cell values of the table row by providing an array of object

public void SetValues(params object[] values)

Parameters

values object[]

Exceptions

ArgumentNullException

Will be thrown if values is null

ArgumentException

Will be thrown if values is an empty array

ArgumentOutOfRangeException

Will be thrown if number of items in values exceeds number of columns in the table.

InvalidOperationException

If the row has previously been deleted.