Skip to main content
A newer version of this page is available. .

TdxSpreadSheetDefinedNames.Items Property

Provides indexed access to individual defined names declared in the document opened in a spreadsheet control.

Declaration

property Items[Index: Integer]: TdxSpreadSheetDefinedName read; default;

Property Value

Type Description
TdxSpreadSheetDefinedName

A defined name in a spreadsheet document.

Remarks

To identify the total number of defined names in the collection, use the Count property.

Example

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[I].Caption;
    AReference := dxSpreadSheet1.DefinedNames[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 GetItemByName function.

See Also