Skip to main content

TdxSpreadSheetCell.GetReference(Boolean,TdxSpreadSheetCellReferenceOptions) Method

Returns a reference to the current cell object.

Declaration

function GetReference(AR1C1ReferenceStyle: Boolean; AOptions: TdxSpreadSheetCellReferenceOptions = []): string; overload;

Parameters

Name Type
AR1C1ReferenceStyle Boolean
AOptions TdxSpreadSheetCellReferenceOptions

Returns

Type
string

Remarks

Use this function to obtain the cell reference that you can use to refer to the current cell object in formula expressions and defined names.

The actual reference type returned by the GetReference function depends on the value passed as the AOptions parameter. By default, the resulting string contains relative references to both the column and row to which the current cell object belongs. However, you can modify the returned cell reference format by adding one or more reference option flags. For detailed information on available cell reference formats, refer to the TdxSpreadSheetCellReferenceOption type description.

Additionally, the overloaded variant allows you to choose between the A1 and R1C1 styles for the resulting cell reference. By default, the GetReference function returns A1-styled cell references. Pass True as the AR1C1ReferenceStyle parameter in order to obtain the R1C1 cell reference.

See Also