JSS to XLSX export Extension

XLSX render is a premium extension and not part of the default distribution.





Source code

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

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

<script src="https://cdn.jsdelivr.net/npm/jszip@3.6.0/dist/jszip.min.js"></script>
<script src="https://jspreadsheet.com/v9/plugins/parser.js"></script>
<script src="https://jspreadsheet.com/v9/plugins/render.js"></script>

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

<input type='button' value='Export to XLSX' onclick="download()">

<script>
// Set your JSS license key (The following key only works for one day)
jspreadsheet.setLicense('N2JmZDAwOWQ3ODA4MWRhMzA2MmU4ODM0YzE3NDk0OTQzMTFhZTM0YWE4MjdkNWY0NDEyYzkzNzE1Y2UxNzEwYjdmYmE2ZjMxOGQxZThkNzY1OTUxMzhiZGZmOGQ0NzI5MmMzODFmNjMwM2E5YTU2NjgyNGYyZGEwNjZlZDExZDYsZXlKdVlXMWxJam9pU25Od2NtVmhaSE5vWldWMElpd2laR0YwWlNJNk1UWTJNREk0TVRZM01pd2laRzl0WVdsdUlqcGJJbXB6Y0hKbFlXUnphR1ZsZEM1amIyMGlMQ0pqYjJSbGMyRnVaR0p2ZUM1cGJ5SXNJbXB6YUdWc2JDNXVaWFFpTENKamMySXVZWEJ3SWl3aWJHOWpZV3hvYjNOMElsMHNJbkJzWVc0aU9pSXpJaXdpYzJOdmNHVWlPbHNpZGpjaUxDSjJPQ0lzSW5ZNUlpd2lZMmhoY25Seklpd2labTl5YlhNaUxDSm1iM0p0ZFd4aElpd2ljR0Z5YzJWeUlpd2ljbVZ1WkdWeUlpd2lZMjl0YldWdWRITWlMQ0pwYlhCdmNuUWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0pkTENKa1pXMXZJanAwY25WbGZRPT0=');

// Set the extensions
jspreadsheet.setExtensions({ parser, render });

// Import a XLSX file from a remote file
jspreadsheet.parser({
    url: '/jspreadsheet/list.xlsx',
    onload: function(config) {
        jspreadsheet(document.getElementById('spreadsheet'), config);
    },
});

// Download method
var download = function() {
    // Render to XLSX
    jspreadsheet.render(document.getElementById('spreadsheet'), {
        filename: 'export.xlsx',
    });
}
</script>
</html>