Skip to content

Class FormulaRangeAddress

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

Represents a range address

public class FormulaRangeAddress : FormulaAddressBase, IAddressInfo, IComparable<FormulaRangeAddress>

Inheritance

object ← FormulaAddressBase ← FormulaRangeAddress

Derived

FormulaTableAddress

Implements

IAddressInfo
IComparable<FormulaRangeAddress>

Inherited Members

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

Constructors

FormulaRangeAddress()

Constructor

public FormulaRangeAddress()

FormulaRangeAddress(ParsingContext)

Constructor

public FormulaRangeAddress(ParsingContext ctx)

Parameters

ctx ParsingContext

FormulaRangeAddress(ParsingContext, string)

Constructor

public FormulaRangeAddress(ParsingContext ctx, string address)

Parameters

ctx ParsingContext

address string

FormulaRangeAddress(ParsingContext, ExcelAddressBase)

Formula range address

public FormulaRangeAddress(ParsingContext ctx, ExcelAddressBase address)

Parameters

ctx ParsingContext

address ExcelAddressBase

FormulaRangeAddress(ParsingContext, int, int, int, int, int)

Formula range address

public FormulaRangeAddress(ParsingContext context, int wsIx, int fromRow, int fromCol, int toRow, int toCol)

Parameters

context ParsingContext

wsIx int

fromRow int

fromCol int

toRow int

toCol int

Fields

FromCol

From row and column. To row and to column

public int FromCol

Field Value

int

FromRow

From row and column. To row and to column

public int FromRow

Field Value

int

ToCol

From row and column. To row and to column

public int ToCol

Field Value

int

ToRow

From row and column. To row and to column

public int ToRow

Field Value

int

Properties

Address

Address

public FormulaRangeAddress Address { get; }

Property Value

FormulaRangeAddress

Addresses

If the address contains multiple comma separated addresses, the individual addresses are stored here.

public FormulaRangeAddress[] Addresses { get; }

Property Value

FormulaRangeAddress[]

Empty

Empty

public static FormulaRangeAddress Empty { get; }

Property Value

FormulaRangeAddress

IsSingleCell

Is single cell

public bool IsSingleCell { get; }

Property Value

bool

WorksheetAddress

Address of the range on the worksheet (i.e. worksheet name is excluded).

public string WorksheetAddress { get; }

Property Value

string

WorksheetName

Worksheet name of the address

public string WorksheetName { get; }

Property Value

string

Methods

Clone()

Clone

public virtual FormulaRangeAddress Clone()

Returns

FormulaRangeAddress

CompareTo(FormulaRangeAddress)

Compare to

public int CompareTo(FormulaRangeAddress other)

Parameters

other FormulaRangeAddress

Returns

int

HasFormulas(ExcelPackage)

Returns true of the address contains formulas. This is used to determine if we can use cached flattened ranges or if we need to evaluate the formulas in the range to get the correct values. The result is cached for performance.

public bool HasFormulas(ExcelPackage package)

Parameters

package ExcelPackage

The ExcelPackage that contains the address

Returns

bool

ToString()

ToString() returns the full address as a string

public override string ToString()

Returns

string