TdxSpreadSheetDefinedNames.AddFromSelection(TdxSpreadSheetTableView) Method
Creates new defined names from the cell selection in a target worksheet.
Declaration
procedure AddFromSelection(AView: TdxSpreadSheetTableView); overload;
Parameters
Name | Type | Description |
---|---|---|
AView | TdxSpreadSheetTableView | A target worksheet. |
Remarks
The number of created defined names depends on the selected cell range and position of cells with defined name identifiers. For instance, an AddFromSelection procedure call creates seven defined names from the following selected cell range if the left column and top row store defined name identifiers:
The corner source cell (‘Corner’) creates a defined name that refers to a rectangular area rather than a column or row.
The AddFromSelection procedure validates defined name identifiers and attempts to append an underscore character to each invalid identifier. If such an identifier remains invalid, an AddFromSelection procedure call creates no corresponding defined name.
Note
You can link a UI element to the CreateDefinedNamesFromSelection command to allow users to create defined names from cell selection.