Define a custom name to be available and used in formulas. If the function is not able to parse the name of the value, it will throw an error.
A new name to be defined. The names are case-insensitive.
It is possible to provide a name that already exists. In such cases, the value is silently updated.
To make the name available only in one sheet, qualify it in the way demonstrated in the next example.
The value has to be a valid formula in the form of a string, that is, without a leading
Generally, a name points to a reference. For maximum compatibility, it is recommended for you to use references here that are fully qualified (include the name of the sheet they refer to) and absolute (prefix both row and column with the
Boolean (default: false)
To hide this name from the custom names dropdown in the toolbar, pass
true. Even if
hidden is set to
false, only reference names will be displayed in the dropdown.
Example - define a few names
<div id="spreadsheet"></div> $("#spreadsheet").kendoSpreadsheet(); var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet"); // cell reference spreadsheet.defineName("MyCell", "Sheet1!$A$1"); // range reference spreadsheet.defineName("MyRange", "Sheet1!$A$1:$C$3"); // qualified name spreadsheet.defineName("Sheet1!Foo", "Sheet1!$B$2"); // relative reference (incompatible with other programs). // relative refs in A1 notation are ambiguous, unless we know // the cell where they are used, so we use the RC notation here: spreadsheet.defineName("CellsAbove", "R1C:R[-1]C"); // arbitrary formula spreadsheet.defineName("GoldenRatio", "(1+SQRT(5))/2"); </script>
After that, it is possible to use any of those names in formulas. For example, a formula like
=SUM(CellsAbove) will return the sum of the cells above it, no matter where it sits. Relative references, such as the
CellsAbove example, are not compatible with other spreadsheets, such as Excel, LibreOffice, or Google Sheets.
Sheet1!Foo name is visible without qualification only in formulas in Sheet1 and, for example, you can type
=Foo * Foo. If you need the name in formulas from other sheets, you have to refer to it as