API Reference
ExcelReference
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.
Returned or exposed by
- Property ExcelFormulaReferenceSyntax.Reference
- Method ExcelReference.BoundingUnion
- Method ExcelReference.Except
- Method ExcelReference.Intersect
- Method ExcelReference.Offset
- Method ExcelReference.Parse
Accepted by parameters
- Method ExcelFormulaSyntaxTree.Rewrite
- Method ExcelReference.BoundingUnion
- Method ExcelReference.Equals
- Method ExcelReference.Except
- Method ExcelReference.Intersect
- Method ExcelReference.Intersects
- Method ExcelReference.TryParse
Methods
public ExcelReference BoundingUnion(ExcelReference other) #ExcelReferenceReturns the smallest rectangle containing both references.
Parameters
- other OfficeIMO.Excel.ExcelReference
public Boolean Contains(Int32 row, Int32 column) #BooleanReturns whether this rectangular reference contains a cell.
Parameters
- row System.Int32
- column System.Int32
public IReadOnlyList<ExcelReference> Except(ExcelReference other) #IReadOnlyList<ExcelReference>Subtracts an overlapping rectangle and returns up to four non-overlapping rectangles.
Parameters
- other OfficeIMO.Excel.ExcelReference
public ExcelReference Intersect(ExcelReference other) #ExcelReferenceReturns the rectangular intersection, or null when the references do not overlap.
Parameters
- other OfficeIMO.Excel.ExcelReference
public Boolean Intersects(ExcelReference other) #BooleanReturns whether two references on the same qualifier intersect.
Parameters
- other OfficeIMO.Excel.ExcelReference
public ExcelReference Offset(Int32 rowOffset, Int32 columnOffset) #ExcelReferenceReturns a translated reference and validates worksheet boundaries.
Parameters
- rowOffset System.Int32
- columnOffset System.Int32
public static ExcelReference Parse(String text, ExcelReferenceStyle style = A1, Int32 anchorRow = 1, Int32 anchorColumn = 1) #ExcelReferenceParses a reference and throws when it is invalid.
Parameters
- text System.String
- style OfficeIMO.Excel.ExcelReferenceStyle = A1
- anchorRow System.Int32 = 1
- anchorColumn System.Int32 = 1
public String ToString(ExcelReferenceStyle style, Int32 anchorRow = 1, Int32 anchorColumn = 1) #StringFormats the reference using A1 or R1C1 notation.
Parameters
- style OfficeIMO.Excel.ExcelReferenceStyle
- anchorRow System.Int32 = 1
- anchorColumn System.Int32 = 1
public static Boolean TryParse(String text, out ExcelReference reference, ExcelReferenceStyle style = A1, Int32 anchorRow = 1, Int32 anchorColumn = 1) #BooleanTries to parse an A1 or R1C1 cell/range reference.
Parameters
- text System.String
- reference OfficeIMO.Excel.ExcelReference@
- style OfficeIMO.Excel.ExcelReferenceStyle = A1
- anchorRow System.Int32 = 1
- anchorColumn System.Int32 = 1
Inherited Methods
Properties
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.