Back to Examples

Jquery Spreadsheet

Create a web-based spreadsheet using jQuery and Jspreadsheet.

<html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

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

<br>

<input type="button" value="Add new row" id="addrow"/>
<input type="button" value="Add new col" id="addcol"/>

<script>
let instance = $('#spreadsheet').jspreadsheet({
    worksheets: [{
        minDimensions:[8,10],
    }],
    license: 'MmNmMzRmYTM3N2NkZDIxODk3OThlMjhhMjJiYTcwM2I1NTQ5YzE1ZDY1ZDFlYWJhMDA1OTEyZWZmYTgyNjkxZTg1MTU2MTg0MTQ4ZjY3Y2M4ZDZlN2NmYzQxYWExNjFkYTNhZDJhNWJlYTc1ZDI2MTlkMzRkYjc5YTg4MTA3ZmQsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpJNE1qazVORFl6TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0ozWldJaUxDSnNiMk5oYkdodmMzUWlYU3dpY0d4aGJpSTZJak0wSWl3aWMyTnZjR1VpT2xzaWRqY2lMQ0oyT0NJc0luWTVJaXdpZGpFd0lpd2lkakV4SWl3aVkyaGhjblJ6SWl3aVptOXliWE1pTENKbWIzSnRkV3hoSWl3aWNHRnljMlZ5SWl3aWNtVnVaR1Z5SWl3aVkyOXRiV1Z1ZEhNaUxDSnBiWEJ2Y25SbGNpSXNJbUpoY2lJc0luWmhiR2xrWVhScGIyNXpJaXdpYzJWaGNtTm9JaXdpY0hKcGJuUWlMQ0p6YUdWbGRITWlMQ0pqYkdsbGJuUWlMQ0p6WlhKMlpYSWlMQ0p6YUdGd1pYTWlYU3dpWkdWdGJ5STZkSEoxWlgwPQ=='
});

document.getElementById("addrow").onclick = () => instance[0].insertRow();
document.getElementById("addcol").onclick = () => instance[0].insertColumn();
</script>
</html>