Skip to content

Class EpplusExcelExternalRangeInfo

Namespace: OfficeOpenXml.FormulaParsing.Ranges
Assembly: EPPlus.dll

Provide the formula parser with information about an workbook external range.

public class EpplusExcelExternalRangeInfo : IRangeInfo, IAddressInfo, IEnumerator<ICellInfo>, IEnumerator, IDisposable, IEnumerable<ICellInfo>, IEnumerable

Inheritance

object ← EpplusExcelExternalRangeInfo

Implements

IAddressInfo
IDisposable
IEnumerable
IEnumerable<ICellInfo>
IEnumerator
IEnumerator<ICellInfo>
IRangeInfo

Inherited Members

object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()

Constructors

EpplusExcelExternalRangeInfo(int, int, int, int, int, int, ParsingContext)

The constructor

public EpplusExcelExternalRangeInfo(int externalReferenceIx, int worksheetIx, int fromRow, int fromCol, int toRow, int toCol, ParsingContext ctx)

Parameters

externalReferenceIx int

Index of the external workbook

worksheetIx int

The external worksheet index/id

fromRow int

The from row of the address

fromCol int

The from column of the address

toRow int

The to row of the address

toCol int

The to column of the address

ctx ParsingContext

Parsing context

EpplusExcelExternalRangeInfo(ExcelExternalWorkbook, FormulaRangeAddress, ParsingContext)

public EpplusExcelExternalRangeInfo(ExcelExternalWorkbook externalWb, FormulaRangeAddress address, ParsingContext ctx)

Parameters

externalWb ExcelExternalWorkbook

address FormulaRangeAddress

ctx ParsingContext

Properties

Address

The address of the range

public FormulaRangeAddress Address { get; }

Property Value

FormulaRangeAddress

Current

Return the current object in the enumeration

public ICellInfo Current { get; }

Property Value

ICellInfo

Dimension

The worksheet dimension if the range referres to an worksheet address, otherwise the size of the array.

public FormulaRangeAddress Dimension { get; }

Property Value

FormulaRangeAddress

IsEmpty

If the range is empty, ie contains no set cells.

public bool IsEmpty { get; }

Property Value

bool

IsInMemoryRange

True if this is a range that doesn't is connected to a worksheet.

public bool IsInMemoryRange { get; }

Property Value

bool

IsMulti

If the range contains more than one set cell.

public bool IsMulti { get; }

Property Value

bool

IsRef

If the range is invalid (#REF!)

public bool IsRef { get; }

Property Value

bool

Size

Size of the range

public RangeDefinition Size { get; }

Property Value

RangeDefinition

Worksheet

Not applicable for external ranges. Returns null

public ExcelWorksheet Worksheet { get; }

Property Value

ExcelWorksheet

Methods

Dispose()

Called when the object is disposed.

public void Dispose()

GetEnumerator()

Gets the enumerator

public IEnumerator<ICellInfo> GetEnumerator()

Returns

IEnumerator<ICellInfo>

The enumerator

GetNCells()

Get the number of cells in the range

public int GetNCells()

Returns

int

GetOffset(int, int)

Get the value from the range with the offset from the top-left cell

public object GetOffset(int rowOffset, int colOffset)

Parameters

rowOffset int

The row offset.

colOffset int

The column offset.

Returns

object

GetOffset(int, int, int, int)

Get a subrange

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

Parameters

rowOffsetStart int

row start index from top left

colOffsetStart int

col start index from top left

rowOffsetEnd int

row end index from top left

colOffsetEnd int

col end index from top left

Returns

IRangeInfo

A new range with the requested cell data

GetValue(int, int)

Gets the value

public object GetValue(int row, int col)

Parameters

row int

The row

col int

The column

Returns

object

IsHidden(int, int)

Returns true if the cell is hidden

public bool IsHidden(int rowOffset, int colOffset)

Parameters

rowOffset int

colOffset int

Returns

bool

MoveNext()

Moves to the next item in the enumeration

public bool MoveNext()

Returns

bool

returns true until the enumeration has reached the last cell.

NextCell()

Moves to the next item in the enumeration

public bool NextCell()

Returns

bool

Reset()

Resets the enumeration

public void Reset()