TdxSpreadSheetDefinedNames.Items Property
In This Article
Provides indexed access to individual defined names declared in the document opened in a spreadsheet control.
#Declaration
Delphi
property Items[Index: Integer]: TdxSpreadSheetDefinedName read; default;
#Property Value
Type | Description |
---|---|
Tdx |
A defined name in a spreadsheet document. |
#Remarks
To identify the total number of defined names in the collection, use the Count property.
#Code Example: List All Defined Name Captions and References
The following code example lists captions and references of all defined names in the collection:
var
I: Integer;
ACaption, AReference: string;
//...
for I := 0 to dxSpreadSheet1.DefinedNames.Count - 1 do
begin
ACaption := dxSpreadSheet1.DefinedNames.Items[I].Caption;
AReference := dxSpreadSheet1.DefinedNames.Items[I].Reference;
cxMemo1.Lines.Strings[I] := ACaption + ' ' + AReference;
end;
Note
To obtain an individual defined name by its caption instead of an index, call the Get
See Also