Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxSpreadSheetCell.GetReference(Boolean,TdxSpreadSheetCellReferenceOptions) Method

Returns a reference to the current cell object.

#Declaration

Delphi
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