API Reference

Class

ExcelReference

Namespace OfficeIMO.Excel
Assembly OfficeIMO.Excel
Implements
IEquatable<ExcelReference>
Modifiers sealed

Parsed, format-neutral Excel cell or range reference. Relative R1C1 endpoints are resolved against the anchor supplied to Int32).

Inheritance

  • Object
  • ExcelReference

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters

Methods

public ExcelReference BoundingUnion(ExcelReference other) #
Returns: ExcelReference

Returns the smallest rectangle containing both references.

Parameters

other OfficeIMO.Excel.ExcelReference requiredposition: 0
public Boolean Contains(Int32 row, Int32 column) #
Returns: Boolean

Returns whether this rectangular reference contains a cell.

Parameters

row System.Int32 requiredposition: 0
column System.Int32 requiredposition: 1
Equals 2 overloads
public virtual Boolean Equals(ExcelReference other) #
Returns: Boolean

Parameters

other OfficeIMO.Excel.ExcelReference requiredposition: 0
public override Boolean Equals(Object obj) #
Returns: Boolean

Parameters

obj System.Object requiredposition: 0
public IReadOnlyList<ExcelReference> Except(ExcelReference other) #
Returns: IReadOnlyList<ExcelReference>

Subtracts an overlapping rectangle and returns up to four non-overlapping rectangles.

Parameters

other OfficeIMO.Excel.ExcelReference requiredposition: 0
public override Int32 GetHashCode() #
Returns: Int32
public ExcelReference Intersect(ExcelReference other) #
Returns: ExcelReference

Returns the rectangular intersection, or null when the references do not overlap.

Parameters

other OfficeIMO.Excel.ExcelReference requiredposition: 0
public Boolean Intersects(ExcelReference other) #
Returns: Boolean

Returns whether two references on the same qualifier intersect.

Parameters

other OfficeIMO.Excel.ExcelReference requiredposition: 0
public ExcelReference Offset(Int32 rowOffset, Int32 columnOffset) #
Returns: ExcelReference

Returns a translated reference and validates worksheet boundaries.

Parameters

rowOffset System.Int32 requiredposition: 0
columnOffset System.Int32 requiredposition: 1
public static ExcelReference Parse(String text, ExcelReferenceStyle style = A1, Int32 anchorRow = 1, Int32 anchorColumn = 1) #
Returns: ExcelReference

Parses a reference and throws when it is invalid.

Parameters

text System.String requiredposition: 0
style OfficeIMO.Excel.ExcelReferenceStyle = A1 optionalposition: 1
anchorRow System.Int32 = 1 optionalposition: 2
anchorColumn System.Int32 = 1 optionalposition: 3
ToString 2 overloads
public String ToString(ExcelReferenceStyle style, Int32 anchorRow = 1, Int32 anchorColumn = 1) #
Returns: String

Formats the reference using A1 or R1C1 notation.

Parameters

style OfficeIMO.Excel.ExcelReferenceStyle requiredposition: 0
anchorRow System.Int32 = 1 optionalposition: 1
anchorColumn System.Int32 = 1 optionalposition: 2
public override String ToString() #
Returns: String
public static Boolean TryParse(String text, out ExcelReference reference, ExcelReferenceStyle style = A1, Int32 anchorRow = 1, Int32 anchorColumn = 1) #
Returns: Boolean

Tries to parse an A1 or R1C1 cell/range reference.

Parameters

text System.String requiredposition: 0
reference OfficeIMO.Excel.ExcelReference@ requiredposition: 1
style OfficeIMO.Excel.ExcelReferenceStyle = A1 optionalposition: 2
anchorRow System.Int32 = 1 optionalposition: 3
anchorColumn System.Int32 = 1 optionalposition: 4

Properties

public ExcelReferenceKind Kind { get; } #

Reference shape.

public String Qualifier { get; } #

Optional workbook/sheet qualifier without the trailing exclamation mark.

public ExcelReferencePoint Start { get; } #

First authored endpoint.

public ExcelReferencePoint End { get; } #

Second authored endpoint. Equals Start for a cell.

public Boolean IsQualified { get; } #

Whether the reference has a workbook or worksheet qualifier.