External values
How to use external values on the spreadsheet calculations.This feature is only available in Formula Premium
<html> <script src="https://jspreadsheet.com/v9/jspreadsheet.js"></script> <script src="https://jsuites.net/v5/jsuites.js"></script> <link rel="stylesheet" href="https://jspreadsheet.com/v9/jspreadsheet.css" type="text/css" /> <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" /> <script src="https://cdn.jsdelivr.net/npm/@jspreadsheet/formula-pro/dist/index.min.js"></script> <div id="spreadsheet"></div> <script> // Set your JSS license key (The following key only works for one day) jspreadsheet.setLicense('MWZjY2MyMzZmNDcyMThhZTY1OWViZTgxYjVlNTM2ZDU2YWU0MjhiOGY1NWY0ZDhmMzczNmFkODYyMTc0MzkyMDk4ZTMxODhjOTE1OWY3MGIzMGQ0ODA3ZWViZjE5Y2U4OTllMTkyNjA2OTkxMDRjMjU4ZDE1YjQ0NDg3YWUyZGMsZXlKdVlXMWxJam9pU25Od2NtVmhaSE5vWldWMElpd2laR0YwWlNJNk1UWTVOakl6T0RVMk5pd2laRzl0WVdsdUlqcGJJbXB6Y0hKbFlXUnphR1ZsZEM1amIyMGlMQ0pqYjJSbGMyRnVaR0p2ZUM1cGJ5SXNJbXB6YUdWc2JDNXVaWFFpTENKamMySXVZWEJ3SWl3aWQyVmlJaXdpYkc5allXeG9iM04wSWwwc0luQnNZVzRpT2lJek5DSXNJbk5qYjNCbElqcGJJblkzSWl3aWRqZ2lMQ0oyT1NJc0luWXhNQ0lzSW1Ob1lYSjBjeUlzSW1admNtMXpJaXdpWm05eWJYVnNZU0lzSW5CaGNuTmxjaUlzSW5KbGJtUmxjaUlzSW1OdmJXMWxiblJ6SWl3aWFXMXdiM0owSWl3aVltRnlJaXdpZG1Gc2FXUmhkR2x2Ym5NaUxDSnpaV0Z5WTJnaUxDSndjbWx1ZENJc0luTm9aV1YwY3lKZExDSmtaVzF2SWpwMGNuVmxmUT09'); // Set the formula pro extension jspreadsheet.setExtensions({ formula }); // Send custom formula to the correct scope formula.define({ qty: 10, max: 20 }) // Send custom formula to the correct scope formula.define({ hello: '"Dealing with strings"' }) // Create spreadsheet jspreadsheet(document.getElementById('spreadsheet'), { worksheets: [{ data: [ [ 'Test', '=qty*max', '=hello' ], ], }] }); </script> </html>