Table of Contents

Class RangeInfo

Namespace
OfficeOpenXml.FormulaParsing.Ranges
Assembly
EPPlus.dll

EPPlus implementation of the IRangeInfo interface

public class RangeInfo : IRangeInfo, IAddressInfo, IEnumerator<ICellInfo>, IEnumerator, IDisposable, IEnumerable<ICellInfo>, IEnumerable
Inheritance
RangeInfo
Implements
Inherited Members

Constructors

RangeInfo(ExcelWorksheet, ExcelAddressBase, ParsingContext)

Constructor

public RangeInfo(ExcelWorksheet ws, ExcelAddressBase address, ParsingContext ctx = null)

Parameters

ws ExcelWorksheet
address ExcelAddressBase
ctx ParsingContext

Parsing context

RangeInfo(ExcelWorksheet, ParsingContext)

public RangeInfo(ExcelWorksheet ws, ParsingContext ctx)

Parameters

ws ExcelWorksheet

The worksheet

ctx ParsingContext

Parsing context

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

Constructor

public RangeInfo(ExcelWorksheet ws, int fromRow, int fromCol, int toRow, int toCol, ParsingContext ctx, int extRef = -1)

Parameters

ws ExcelWorksheet

The worksheet

fromRow int
fromCol int
toRow int
toCol int
ctx ParsingContext

Parsing context

extRef int

External reference id

RangeInfo(FormulaRangeAddress)

Constructor

public RangeInfo(FormulaRangeAddress address)

Parameters

address FormulaRangeAddress

Properties

Address

Address of the range

public FormulaRangeAddress Address { get; }

Property Value

FormulaRangeAddress

Current

Current cell

public ICellInfo Current { get; }

Property Value

ICellInfo

Dimension

Dimension

public FormulaRangeAddress Dimension { get; }

Property Value

FormulaRangeAddress

IsEmpty

Returns true if the range is empty

public bool IsEmpty { get; }

Property Value

bool

IsInMemoryRange

Returns true if the range is an InMemoryRange

public bool IsInMemoryRange { get; }

Property Value

bool

IsMulti

Returns true if more than one cell

public bool IsMulti { get; }

Property Value

bool

IsRef

Returns true if the range represents an invalid reference

public bool IsRef { get; }

Property Value

bool

Size

Size of the range

public RangeDefinition Size { get; }

Property Value

RangeDefinition

Worksheet

The worksheet

public ExcelWorksheet Worksheet { get; }

Property Value

ExcelWorksheet

Methods

Dispose()

Runs at dispose of this instance

public void Dispose()

GetEnumerator()

Returns enumerator for cells

public IEnumerator<ICellInfo> GetEnumerator()

Returns

IEnumerator<ICellInfo>

GetNCells()

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

public int GetNCells()

Returns

int

GetOffset(int, int)

Return value by offset

public object GetOffset(int rowOffset, int colOffset)

Parameters

rowOffset int
colOffset int

Returns

object

GetOffset(int, int, int, int)

Returns a subrange

public IRangeInfo GetOffset(int rowOffsetStart, int colOffsetStart, int rowOffsetEnd, int colOffsetEnd)

Parameters

rowOffsetStart int
colOffsetStart int
rowOffsetEnd int
colOffsetEnd int

Returns

IRangeInfo

GetValue(int, int)

Returns the cell value by 0-based index

public object GetValue(int row, int col)

Parameters

row int

0-based row index

col int

0-based col index

Returns

object

Cell value

IsHidden(int, int)

Is hidden

public bool IsHidden(int rowOffset, int colOffset)

Parameters

rowOffset int
colOffset int

Returns

bool

MoveNext()

Moves to next cell

public bool MoveNext()

Returns

bool

NextCell()

Moves to next cell

public bool NextCell()

Returns

bool

Reset()

public void Reset()