Interface IRangeInfo
Information about a specific range used by the formula parser.
Inherited Members
Namespace: OfficeOpenXml.FormulaParsing
Assembly: EPPlus.dll
Syntax
public interface IRangeInfo : IAddressInfo, IEnumerator<ICellInfo>, IEnumerator, IDisposable, IEnumerable<ICellInfo>, IEnumerable
Properties
Dimension
The worksheet dimension if the range refers to an worksheet address, otherwise the size of the array.
Declaration
FormulaRangeAddress Dimension { get; }
Property Value
| Type | Description |
|---|---|
| FormulaRangeAddress |
IsEmpty
If the range is empty
Declaration
bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsInMemoryRange
Returns true if the range is not referring to the cell store, but rather keeps the data in memory.
Declaration
bool IsInMemoryRange { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsMulti
If the range contains more than one cell with a value.
Declaration
bool IsMulti { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsRef
If the range is not valid and returns #REF!
Declaration
bool IsRef { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Size
Size of the range, i.e. number of Cols and number of Rows
Declaration
RangeDefinition Size { get; }
Property Value
| Type | Description |
|---|---|
| RangeDefinition |
Worksheet
The worksheet
Declaration
ExcelWorksheet Worksheet { get; }
Property Value
| Type | Description |
|---|---|
| ExcelWorksheet |
Methods
GetAddressDimensionAdjusted(int)
Get the address adjusted inside the dimension of the worksheet.
Declaration
FormulaRangeAddress GetAddressDimensionAdjusted(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index of the address. |
Returns
| Type | Description |
|---|---|
| FormulaRangeAddress | The address adjusted within the dimension of the worksheet. |
GetNCells()
Get number of cells
Declaration
int GetNCells()
Returns
| Type | Description |
|---|---|
| int | Number of cells |
GetOffset(int, int)
Gets
Declaration
object GetOffset(int rowOffset, int colOffset)
Parameters
| Type | Name | Description |
|---|---|---|
| int | rowOffset | |
| int | colOffset |
Returns
| Type | Description |
|---|---|
| object |
GetOffset(int, int, int, int)
Get a subrange
Declaration
IRangeInfo GetOffset(int rowOffsetStart, int colOffsetStart, int rowOffsetEnd, int colOffsetEnd)
Parameters
| Type | Name | Description |
|---|---|---|
| int | rowOffsetStart | row start index from top left |
| int | colOffsetStart | col start index from top left |
| int | rowOffsetEnd | row end index from top left |
| int | colOffsetEnd | col end index from top left |
Returns
| Type | Description |
|---|---|
| IRangeInfo | A new range with the requested cell data |
GetRangeInfoByValue()
Gets dimension of rang excluding null values
Declaration
IRangeInfo GetRangeInfoByValue()
Returns
| Type | Description |
|---|---|
| IRangeInfo |
GetValue(int, int)
Get the value from a cell
Declaration
object GetValue(int row, int col)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | The Row |
| int | col | The Column |
Returns
| Type | Description |
|---|---|
| object |
IsHidden(int, int)
Returns true if the cell is hidden
Declaration
bool IsHidden(int rowOffset, int colOffset)
Parameters
| Type | Name | Description |
|---|---|---|
| int | rowOffset | |
| int | colOffset |
Returns
| Type | Description |
|---|---|
| bool |