Skip to main content

TdxSpreadSheetDefinedName.EnumReferences(TdxSpreadSheetFormulaEnumReferencesProc) Method

Extracts the technical information on the worksheet and area reference stored within the defined name object.

Declaration

procedure EnumReferences(AProc: TdxSpreadSheetFormulaEnumReferencesProc);

Parameters

Name Type
AProc TdxSpreadSheetFormulaEnumReferencesProc

Remarks

For defined names containing references to cells or cell ranges, this procedure allows you to extract the Table View worksheet instance in which the referenced cell or cell range is located, as well as the actual area occupied by it. If the defined name was created for either a formula expression or constant, it does not contain valid cell range areas and/or worksheet references. Since there is no universal approach to extracting the referenced cell areas, invoke the EnumReferences procedure with caution.

The AProc parameter specifies the TdxSpreadSheetFormulaEnumReferencesProc anonymous procedure whose AArea and ASheet parameters are used to extract the area occupied by a referenced cell or cell range and the Table View worksheet in which it is located, respectively. If the defined name actually contains a reference to an individual cell or cell range, the AArea parameter returns the row and column indexes of cells in the top-left and bottom-right corners of the area. If the defined name refers to a constant or formula expression instead of a cell range, the AArea parameter returns Rect(0, 0, 0, 0).

For details on the practical use of the EnumReferences procedure, refer to the How to Obtain the Area Information from Cell References topic.

Note

Unlike the EnumReferences procedure, the Reference property provides a more universal approach to defined name reference manipulation, allowing you to identify the type of object to which the defined name is referring and obtain and/or customize the reference itself.

See Also