Back to Examples

XLSX Extension

The XLSX parser is not part of the native distribution, and requires a special license.

You might experience differences from the original files due to known limitations, depending on the file format and non-implemented features. We are constantly improving based on our users' feedback, so feel free to submit any improvement requests

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

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

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

<input type="file" name="file" id='file' onchange="load(event)" style='display:none'>

<input type='button' value='Load a XLSX file from my local computer' id="loadlocal">

<script>
// Set the JSS spreadsheet license
jspreadsheet.setLicense('YmRjOTM2NzYxZDcxMThmZTU4ZDkzZWMyM2NmNGY2MTZkMDRkYzRhODk3MmM2OWY0NTY3YzM1NzQyNDRkZmE2YzMzYTc4YjM3MzM4ZDJlYzBmYzkyNjg0NDAwNzMyMDg0ZjU2OGEwZmE0Y2Q1NjdlMDg1MjkyYmViYjVlNDMzYmUsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpNd09EZ3dNakUyTENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0ozWldJaUxDSnNiMk5oYkdodmMzUWlYU3dpY0d4aGJpSTZJak0wSWl3aWMyTnZjR1VpT2xzaWRqY2lMQ0oyT0NJc0luWTVJaXdpZGpFd0lpd2lkakV4SWl3aVkyaGhjblJ6SWl3aVptOXliWE1pTENKbWIzSnRkV3hoSWl3aWNHRnljMlZ5SWl3aWNtVnVaR1Z5SWl3aVkyOXRiV1Z1ZEhNaUxDSnBiWEJ2Y25SbGNpSXNJbUpoY2lJc0luWmhiR2xrWVhScGIyNXpJaXdpYzJWaGNtTm9JaXdpY0hKcGJuUWlMQ0p6YUdWbGRITWlMQ0pqYkdsbGJuUWlMQ0p6WlhKMlpYSWlMQ0p6YUdGd1pYTWlYU3dpWkdWdGJ5STZkSEoxWlgwPQ==');

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

// Create the spreadsheet from a local file
let load = function(e) {
    // Parse XLSX file and create a new spreadsheet
    jspreadsheet.parser({
        file: e.target.files[0],
        onload: function(config) {
            jspreadsheet(document.getElementById('spreadsheet'), config);
        },
    });
}

document.getElementById("loadlocal").onclick = () => document.getElementById('file').click()
document.getElementById("file").onchange = load
</script>
</html>