Products

Defined Names

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

Documentation

Methods

Available methods

Method Description
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

Property Description
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>
let 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('NjIxMjA3MmEzMzEwN2EwMWYxNTc3NTkwMWVlYzZiZmJjZGE3ZDZkOGQzMjEyZmQzYzc4ZWM3YWI0Y2RjNWMxYTYxOTgzMzU1MDgwODJhNjhlMTFlMjAzMGRhNjgyN2VmMGQ1MWQ4ZTFkNjAwOGRmNDNlOGQ4MTA5MzdmZjc2YTMsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpZd01qUTRPRFl5TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0ltTm9ZWEowY3lJc0ltWnZjbTF6SWl3aVptOXliWFZzWVNJc0luQmhjbk5sY2lJc0luSmxibVJsY2lJc0ltTnZiVzFsYm5Seklpd2lhVzF3YjNKMFpYSWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0lzSW5CeWFXNTBJaXdpYzJobFpYUnpJaXdpWTJ4cFpXNTBJaXdpYzJWeWRtVnlJaXdpYzJoaGNHVnpJaXdpWm05eWJXRjBJbDBzSW1SbGJXOGlPblJ5ZFdWOQ==');

// Create a new spreadsheet
let 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>