Class ExcelTableRow
Represents a row in an ExcelTable
Inherited Members
Namespace: OfficeOpenXml.Table
Assembly: EPPlus.dll
Syntax
public class ExcelTableRow
Properties
ColumnCount
Number of columns
Declaration
public int ColumnCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
IsDeleted
Indicates if this row has been deleted.
Declaration
public bool IsDeleted { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsEmpty
Returns true if every cell in the row has null values
Declaration
public bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsHidden
Returns true if the entire row is hidden
Declaration
public bool IsHidden { get; }
Property Value
| Type | Description |
|---|---|
| bool |
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(int)
Returns formula by 0-based column index
Declaration
public string GetFormula(int offsetIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | offsetIndex |
Returns
| Type | Description |
|---|---|
| string |
GetFormula(string)
Returns formula by column name.
Declaration
public string GetFormula(string columnName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | columnName |
Returns
| Type | Description |
|---|---|
| string |
GetValue(int)
Returns cell value by column index
Declaration
public object GetValue(int offsetIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | offsetIndex | 0-based column index |
Returns
| Type | Description |
|---|---|
| object |
Exceptions
| Type | Condition |
|---|---|
| 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 |
|---|---|---|
| string | columnName |
Returns
| Type | Description |
|---|---|
| object |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | If the row has previously been deleted. |
GetValue<T>(int)
Returns cell value by column index
Declaration
public T GetValue<T>(int offsetIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | offsetIndex | 0-based column index |
Returns
| Type | Description |
|---|---|
| T |
Type Parameters
| Name | Description |
|---|---|
| T | Cell value type |
Exceptions
| Type | Condition |
|---|---|
| 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 |
|---|---|---|
| string | columnName |
Returns
| Type | Description |
|---|---|
| T |
Type Parameters
| Name | Description |
|---|---|
| T | Cell value type |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | If the row has previously been deleted. |
SetValue(int, object)
Set a cell value by column index
Declaration
public ExcelTableRow SetValue(int offsetIndex, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | offsetIndex | 0-based column index |
| object | value | The table cell value |
Returns
| Type | Description |
|---|---|
| ExcelTableRow |
Exceptions
| Type | Condition |
|---|---|
| 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 |
|---|---|---|
| string | columnName | The table column name |
| object | value | The table cell value |
Returns
| Type | Description |
|---|---|
| ExcelTableRow |
Exceptions
| Type | Condition |
|---|---|
| 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
Declaration
public void SetValues(params object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
| object[] | values |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Will be thrown if |
| ArgumentException | Will be thrown if |
| ArgumentOutOfRangeException | Will be thrown if number of items in |
| InvalidOperationException | If the row has previously been deleted. |