Back to Examples

Spreadsheet Grid Line

The property gridline: false disables the worksheet grid line. Default: true

Examples

The following example shows how to disable the spreadsheet grid line.

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

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

<p><input type="button" value="toggle()" id="togglebtn"></p>

<script>
let toggle = function(b) {
    if (worksheets[0].table.classList.contains('jss_nogridline')) {
        worksheets[0].table.classList.remove('jss_nogridline');
    } else {
        worksheets[0].table.classList.add('jss_nogridline');
    }
}

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

// Create a new spreadsheet
let worksheets = jspreadsheet(document.getElementById('spreadsheet'), {
    worksheets: [{
        data: [
            ['Mazda', 2001, 2000, 1],
            ['Peugeot', 2010, 5000, 1],
            ['Honda Fit', 2009, 3000, 1],
            ['Honda CRV', 2010, 6000, 0],
        ],
        gridline: false,
    }]
});

document.getElementById("togglebtn").onclick = () => toggle(worksheets[0]);
</script>
</html>