A1Ref
Represents an A1-style cell or range reference with optional workbook and sheet context
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new A1Ref(range: string | Range | A1Ref, context?: RefContext): A1Ref;Creates a new A1Ref instance
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
range | string | Range | A1Ref | A string reference (e.g., “A1”, “Sheet1!A1:B2”), Range object, or existing A1Ref to clone |
context? | RefContext | Optional context providing workbook and sheet names |
Returns
Section titled “Returns”A1Ref
Throws
Section titled “Throws”When the reference is invalid or coordinates are out of bounds
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
range | Range | The range coordinates |
sheetName | string | Name of the sheet containing this reference |
workbookName | string | Name of the workbook containing this reference |
Accessors
Section titled “Accessors”bottom
Section titled “bottom”Get Signature
Section titled “Get Signature”get bottom(): number;Gets the bottom row index
Returns
Section titled “Returns”number
height
Section titled “height”Get Signature
Section titled “Get Signature”get height(): number;Gets the height of the range (number of rows)
Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get left(): number;Gets the left column index
Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get right(): number;Gets the right column index
Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get top(): number;Gets the top row index
Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get width(): number;Gets the width of the range (number of columns)
Returns
Section titled “Returns”number
Methods
Section titled “Methods”toString()
Section titled “toString()”toString(): string;Converts the reference to its A1 string representation
Returns
Section titled “Returns”string
The A1-style string representation (e.g., “Sheet1!A1:B2”)