Show / Hide Table of Contents

Class ExcelTableRow

Represents a row in an ExcelTable

Inheritance
System.Object
ExcelTableRow
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OfficeOpenXml.Table
Assembly: EPPlus.dll
Syntax
public class ExcelTableRow

Properties

ColumnCount

Number of columns

Declaration
public int ColumnCount { get; }
Property Value
Type Description
System.Int32

IsDeleted

Indicates if this row has been deleted.

Declaration
public bool IsDeleted { get; }
Property Value
Type Description
System.Boolean

IsEmpty

Returns true if every cell in the row has null values

Declaration
public bool IsEmpty { get; }
Property Value
Type Description
System.Boolean

IsHidden

Returns true if the entire row is hidden

Declaration
public bool IsHidden { get; }
Property Value
Type Description
System.Boolean

RowRange

An ExcelRangeBase representing the row from first to last cell

Declaration
public ExcelRangeBase RowRange { get; }
Property Value
Type Description
ExcelRangeBase

Methods

Clear()

Clear all cell values in the row's range.

Declaration
public ExcelTableRow Clear()
Returns
Type Description
ExcelTableRow

Delete()

Removes this row from the table

Declaration
public void Delete()

GetFormula(Int32)

Returns formula by 0-based column index

Declaration
public string GetFormula(int offsetIndex)
Parameters
Type Name Description
System.Int32 offsetIndex
Returns
Type Description
System.String

GetFormula(String)

Returns formula by column name.

Declaration
public string GetFormula(string columnName)
Parameters
Type Name Description
System.String columnName
Returns
Type Description
System.String

GetValue(Int32)

Returns cell value by column index

Declaration
public object GetValue(int offsetIndex)
Parameters
Type Name Description
System.Int32 offsetIndex

0-based column index

Returns
Type Description
System.Object
Exceptions
Type Condition
System.InvalidOperationException

If the row has previously been deleted.

GetValue(String)

Returns cell value by column name

Declaration
public object GetValue(string columnName)
Parameters
Type Name Description
System.String columnName
Returns
Type Description
System.Object
Exceptions
Type Condition
System.InvalidOperationException

If the row has previously been deleted.

GetValue<T>(Int32)

Returns cell value by column index

Declaration
public T GetValue<T>(int offsetIndex)
Parameters
Type Name Description
System.Int32 offsetIndex

0-based column index

Returns
Type Description
T
Type Parameters
Name Description
T

Cell value type

Exceptions
Type Condition
System.InvalidOperationException

If the row has previously been deleted.

GetValue<T>(String)

Returns cell value by column name

Declaration
public T GetValue<T>(string columnName)
Parameters
Type Name Description
System.String columnName
Returns
Type Description
T
Type Parameters
Name Description
T

Cell value type

Exceptions
Type Condition
System.InvalidOperationException

If the row has previously been deleted.

SetValue(Int32, Object)

Set a cell value by column index

Declaration
public ExcelTableRow SetValue(int offsetIndex, object value)
Parameters
Type Name Description
System.Int32 offsetIndex

0-based column index

System.Object value

The table cell value

Returns
Type Description
ExcelTableRow
Exceptions
Type Condition
System.InvalidOperationException

If the row has previously been deleted.

SetValue(String, Object)

Set a cell value by column name

Declaration
public ExcelTableRow SetValue(string columnName, object value)
Parameters
Type Name Description
System.String columnName

The table column name

System.Object value

The table cell value

Returns
Type Description
ExcelTableRow
Exceptions
Type Condition
System.InvalidOperationException

If the row has previously been deleted.

SetValues(Object[])

Set all the cell values of the table row by providing an array of System.Object

Declaration
public void SetValues(params object[] values)
Parameters
Type Name Description
System.Object[] values
Exceptions
Type Condition
System.ArgumentNullException

Will be thrown if values is null

System.ArgumentException

Will be thrown if values is an empty array

System.ArgumentOutOfRangeException

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

System.InvalidOperationException

If the row has previously been deleted.

In This Article
Back to top Generated by DocFX