Defined names Premium

Define a name for a cell or a range of cells. Apply those to your formulas to create clear expressions.

Documentation

Methods

Available methods
MethodDescription
getDefinedNames Get a defined name.
getDefinedNames(index: String) => Object
@Param string - defined names identification.
setDefinedNames Create a new defined name.
setDefinedNames(names: Array) => void
@param {array} - Array with the new defined names.


Settings

All available properties to define a validation
PropertyDescription
definedNames: array An array of defined names


Example

Initiate the spreadsheet with defined names.



<html>
<script src="https://jspreadsheet.com/v9/jspreadsheet.js"></script>
<link rel="stylesheet" href="https://jspreadsheet.com/v9/jspreadsheet.css" type="text/css" />
<script src="https://jsuites.net/v5/jsuites.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v5/jsuites.css" type="text/css" />

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons" />

<div id="spreadsheet"></div>

<script>
var set = function() {
    // Create a new defined name
    spreadsheet[0].setDefinedNames([{
        index: 'Calculations',
        value: 'Sheet1!A1:A6',
    }]);
}

// Set the extension
jspreadsheet.setExtensions({ formula });

// Set your JSS license key (The following key only works for one day)
jspreadsheet.setLicense('MTY3MWVmMGU0YzRhMThhMjAyYTljYjE2M2VhMjIzMDhhZGYwYTVhYzdlOGFiMGI5MzMwYmE5NDI0OGQxNGRkODMyMTgzMjAxOTYxNTc0OTM1OTI1MGM3NTFhN2E1NjY5YjBiNjlmOGZiNDQ5ZWVkZDk4NzViNGQ3MzhlMDc1YTYsZXlKdVlXMWxJam9pU25Od2NtVmhaSE5vWldWMElpd2laR0YwWlNJNk1UY3hNVFkzT1RNNU5Dd2laRzl0WVdsdUlqcGJJbXB6Y0hKbFlXUnphR1ZsZEM1amIyMGlMQ0pqYjJSbGMyRnVaR0p2ZUM1cGJ5SXNJbXB6YUdWc2JDNXVaWFFpTENKamMySXVZWEJ3SWl3aWQyVmlJaXdpYkc5allXeG9iM04wSWwwc0luQnNZVzRpT2lJek5DSXNJbk5qYjNCbElqcGJJblkzSWl3aWRqZ2lMQ0oyT1NJc0luWXhNQ0lzSW1Ob1lYSjBjeUlzSW1admNtMXpJaXdpWm05eWJYVnNZU0lzSW5CaGNuTmxjaUlzSW5KbGJtUmxjaUlzSW1OdmJXMWxiblJ6SWl3aWFXMXdiM0owWlhJaUxDSmlZWElpTENKMllXeHBaR0YwYVc5dWN5SXNJbk5sWVhKamFDSXNJbkJ5YVc1MElpd2ljMmhsWlhSeklsMHNJbVJsYlc4aU9uUnlkV1Y5');

// Create a new spreadsheet
var spreadsheet = jspreadsheet(document.getElementById('spreadsheet'), {
    toolbar: true,
    worksheets: [{
        data: [
            [10, "=SUM(Summary)"],
            [20, ""],
            [30, ""],
            [40, ""],
            [50, ""]
        ],
        minDimensions: [6, 6],
    }],
    definedNames: {
        Summary: 'Sheet1!A1:A6',
    }
});
</script>
</html>