Class ReferredArea

Class ReferredArea

Namespace: Aspose.Cells
Assembly: Aspose.Cells.dll (25.2.0)

Represents a referred area by the formula.

public class ReferredArea

Inheritance

objectReferredArea

Inherited Members

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

Properties

EndColumn

The end column of the area.

public int EndColumn { get; }

Property Value

int

EndRow

The end row of the area.

public int EndRow { get; }

Property Value

int

ExternalFileName

Get the external file name if this is an external reference.

public string ExternalFileName { get; }

Property Value

string

IsArea

Indicates whether this is an area.

public bool IsArea { get; }

Property Value

bool

Remarks

If this is not an area, only StartRow and StartColumn effect.

IsEntireColumn

Indicates whether this area contains all rows(entire column).

public bool IsEntireColumn { get; }

Property Value

bool

IsEntireRow

Indicates whether this area contains all columns(entire row).

public bool IsEntireRow { get; }

Property Value

bool

IsExternalLink

Indicates whether this is an external link.

public bool IsExternalLink { get; }

Property Value

bool

SheetName

Indicates which sheet this reference is in.

public string SheetName { get; }

Property Value

string

Remarks

If it references to multiple worksheets, the returned value is just like the range expression in the formula. For example “Sheet1:Sheet3” for the reference in formula “=SUM(Sheet1:Sheet3!$A$1:$B$2)”.

SheetNames

Names of all the worksheets this instance references to.

public string[] SheetNames { get; }

Property Value

string[]

StartColumn

The start column of the area.

public int StartColumn { get; }

Property Value

int

StartRow

The start row of the area.

public int StartRow { get; }

Property Value

int

Methods

GetValue(int, int)

Gets cell value with given offset from the top-left of this area.

public object GetValue(int rowOffset, int colOffset)

Parameters

rowOffset int

row offset from the start row of this area

colOffset int

column offset from the start row of this area

Returns

object

“#REF!” if this area is invalid; “#N/A” if given offset out of this area; Otherwise return the cell value at given position.

GetValue(int, int, bool)

Gets cell value with given offset from the top-left of this area.

public object GetValue(int rowOffset, int colOffset, bool calculateFormulas)

Parameters

rowOffset int

row offset from the start row of this area

colOffset int

column offset from the start row of this area

calculateFormulas bool

Whether calculate it recursively if the specified reference is formula

Returns

object

“#REF!” if this area is invalid; “#N/A” if given offset out of this area; Otherwise return the cell value at given position.

GetValues()

Gets cell values in this area.

public object GetValues()

Returns

object

If this area is invalid, “#REF!” will be returned; If this area is one single cell, then return the cell value object; Otherwise return one 2D array for all values in this area.

GetValues(bool)

Gets cell values in this area.

public object GetValues(bool calculateFormulas)

Parameters

calculateFormulas bool

In this range, if there are some formulas that have not been calculated, this flag denotes whether those formulas should be calculated recursively

Returns

object

If this area is invalid, “#REF!” will be returned; If this area is one single cell, then return the cell value object; Otherwise return one 2D array for all values in this area.

ToString()

Returns the reference address of this area. Generally it is the address of the reference which may be used in formula, such as “Sheet1!A1:C3”.

public override string ToString()

Returns

string

the reference address of this area.