Table of Contents

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
EpplusExcelExternalRangeInfo
Implements
Inherited Members

Constructors

EpplusExcelExternalRangeInfo(ExcelExternalWorkbook, FormulaRangeAddress, ParsingContext)

Constructor with external workbook

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

Parameters

externalWb ExcelExternalWorkbook
address FormulaRangeAddress
ctx ParsingContext

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

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

Dimension

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 offset

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)

Gets the value

public object GetValue(int row, int col)

Parameters

row int

The row

col int

The column

Returns

object

IsHidden(int, int)

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()