Show / Hide Table of Contents

Class RangeInfo

EPPlus implementation of the IRangeInfo interface

Inheritance
object
RangeInfo
Implements
IRangeInfo
IAddressInfo
IEnumerator<ICellInfo>
IEnumerator
IDisposable
IEnumerable<ICellInfo>
IEnumerable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: OfficeOpenXml.FormulaParsing.Ranges
Assembly: EPPlus.dll
Syntax
public class RangeInfo : IRangeInfo, IAddressInfo, IEnumerator<ICellInfo>, IEnumerator, IDisposable, IEnumerable<ICellInfo>, IEnumerable

Constructors

RangeInfo(ExcelWorksheet, ExcelAddressBase, ParsingContext)

Constructor

Declaration
public RangeInfo(ExcelWorksheet ws, ExcelAddressBase address, ParsingContext ctx = null)
Parameters
Type Name Description
ExcelWorksheet ws
ExcelAddressBase address
ParsingContext ctx

Parsing context

RangeInfo(ExcelWorksheet, ParsingContext)

Declaration
public RangeInfo(ExcelWorksheet ws, ParsingContext ctx)
Parameters
Type Name Description
ExcelWorksheet ws

The worksheet

ParsingContext ctx

Parsing context

RangeInfo(ExcelWorksheet, int, int, int, int, ParsingContext, int)

Constructor

Declaration
public RangeInfo(ExcelWorksheet ws, int fromRow, int fromCol, int toRow, int toCol, ParsingContext ctx, int extRef = -1)
Parameters
Type Name Description
ExcelWorksheet ws

The worksheet

int fromRow
int fromCol
int toRow
int toCol
ParsingContext ctx

Parsing context

int extRef

External reference id

RangeInfo(FormulaRangeAddress)

Constructor

Declaration
public RangeInfo(FormulaRangeAddress address)
Parameters
Type Name Description
FormulaRangeAddress address

Properties

Address

The first address of the range

Declaration
public FormulaRangeAddress Address { get; }
Property Value
Type Description
FormulaRangeAddress

Addresses

If the address contains more the one address (i.e A1:A2,A4), this array contains all addresses

Declaration
public FormulaRangeAddress[] Addresses { get; }
Property Value
Type Description
FormulaRangeAddress[]

Current

Current cell

Declaration
public ICellInfo Current { get; }
Property Value
Type Description
ICellInfo

Dimension

Dimension

Declaration
public FormulaRangeAddress Dimension { get; }
Property Value
Type Description
FormulaRangeAddress

IsEmpty

Returns true if the range is empty

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

IsInMemoryRange

Returns true if the range is an InMemoryRange

Declaration
public bool IsInMemoryRange { get; }
Property Value
Type Description
bool

IsMulti

Returns true if more than one cell

Declaration
public bool IsMulti { get; }
Property Value
Type Description
bool

IsRef

Returns true if the range represents an invalid reference

Declaration
public bool IsRef { get; }
Property Value
Type Description
bool

Size

Size of the range

Declaration
public RangeDefinition Size { get; }
Property Value
Type Description
RangeDefinition

Worksheet

The worksheet

Declaration
public ExcelWorksheet Worksheet { get; }
Property Value
Type Description
ExcelWorksheet

Methods

Dispose()

Runs at dispose of this instance

Declaration
public void Dispose()

GetAddressDimensionAdjusted(int)

Get the address adjusted inside the dimension of the worksheet.

Declaration
public FormulaRangeAddress GetAddressDimensionAdjusted(int index = 0)
Parameters
Type Name Description
int index

The index of the address.

Returns
Type Description
FormulaRangeAddress

The address adjusted within the dimension of the worksheet.

GetEnumerator()

Returns enumerator for cells

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

GetNCells()

The total number of cells (including empty) of the range

Declaration
public int GetNCells()
Returns
Type Description
int

GetOffset(int, int)

Return value by offset

Declaration
public object GetOffset(int rowOffset, int colOffset)
Parameters
Type Name Description
int rowOffset
int colOffset
Returns
Type Description
object

GetOffset(int, int, int, int)

Returns a subrange

Declaration
public IRangeInfo GetOffset(int rowOffsetStart, int colOffsetStart, int rowOffsetEnd, int colOffsetEnd)
Parameters
Type Name Description
int rowOffsetStart
int colOffsetStart
int rowOffsetEnd
int colOffsetEnd
Returns
Type Description
IRangeInfo

GetRangeInfoByValue()

Gets the IRangeInfo for the range for the first and last value in the range (top-left to bottom-right)

Declaration
public IRangeInfo GetRangeInfoByValue()
Returns
Type Description
IRangeInfo

The range

GetValue(int, int)

Returns the cell value by 0-based index

Declaration
public object GetValue(int row, int col)
Parameters
Type Name Description
int row

0-based row index

int col

0-based col index

Returns
Type Description
object

Cell value

IsHidden(int, int)

Is hidden

Declaration
public bool IsHidden(int rowOffset, int colOffset)
Parameters
Type Name Description
int rowOffset
int colOffset
Returns
Type Description
bool

MoveNext()

Moves to next cell

Declaration
public bool MoveNext()
Returns
Type Description
bool

NextCell()

Moves to next cell

Declaration
public bool NextCell()
Returns
Type Description
bool

Reset()

Declaration
public void Reset()

Implements

IRangeInfo
IAddressInfo
IEnumerator<T>
IEnumerator
IDisposable
IEnumerable<T>
IEnumerable
In this article
Back to top Generated by DocFX