Name Box
- 3 minutes to read
A Name Box is a visual control (SpreadsheetNameBoxControl) that accompanies the SpreadsheetControl, and is usually located above the worksheet area, to the left of the formula bar.
The name box displays a reference to a cell that is currently active. If a cell range selected in a worksheet has a name, the name box displays the range name, as well as a table, picture or chart name when the corresponding object is selected. The name box also allows end-users to create workbook level defined names for cells, and quickly navigate to cells by their references and names.
The name box is bound to the SpreadsheetControl via the SpreadsheetNameBoxControl.SpreadsheetControl property. To add a name box to your spreadsheet application, drag-and-drop the corresponding item from the DX.17.2: Spreadsheet toolbox tab. You can also select the Create FormulaBar in the SpreadsheetControl’s smart tag menu to add the name box together with the formula bar simultaneously, so that these controls are automatically positioned above the worksheet (see the Getting Started example).
Below is the list of capabilities provided by the name box.
Obtain an active cell reference
The name box displays a reference of the current active cell.
Select cells by references
Name box allows selecting cells in a worksheet by their references, without using the mouse or keyboard shortcuts.
Operation
How to implement the operation
Select a cell range in the active worksheet
Type the cell range reference in the name box and press the Enter key.
Select a cell range in any worksheet in the current workbook
In the name box, type the worksheet name before the cell reference, separating them with an exclamation point (!), and press the Enter key.
Select multiple ranges simultaneously
In the name box, type cell range references, separating them with commas, and press the Enter key.
Control the number of rows and columns while selecting a cell range with the mouse
The name box displays the number of rows and columns currently selected while an end-user is selecting cells and the left mouse button is being pressed.
Create workbook level names for cells
One of the ways to create a name for a cell range is to use the name box, following the steps below.
- Select a cell range to be named.
- Click the name box (by default, it shows the reference of the active cell).
- Type the desired name (the Defined Names document lists the syntax rules for names). Note that a name cannot be entered into the name box while cell content is being edited.
- Press the Enter key.
Note
To create defined names more flexibly (for example, specify a formula or constant to be associated with the defined name, or set an individual worksheet to be the scope of the name, or accompany the name with a comment), the New Name dialog can be used. Defined names for cell ranges can also be automatically generated from values in the selected cells via the Create Names from Selection dialog.
Select cells by names
Name box allows selecting cells in a worksheet by their names. In the name box, type or select from the drop-down list an existing cell range name, and press the Enter key.
Obtain the selected table, picture or chart name
The name box displays the name of the table, picture or chart currently selected in the SpreadsheetControl.