Products

Back to Examples

Project management spreadsheet

A simple online task management spreadsheet.

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

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

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

// Create the spreadsheet
let spreadsheet = jspreadsheet(document.getElementById('spreadsheet'), {
    worksheets: [{
        data: [
            [ '=B1', '2', 'New products section', '2019-02-12', '80' ],
            [ '=B2', '2', 'API integration', '2019-03-01', '100' ],
            [ '=B3', '4', 'Deck', '2018-11-10', '30' ],
            [ '=B4', '2', 'Prototype', '2019-01-12', '0' ],
        ],
        columns: [
            {
                type: 'text',
                width: '60px',
                title: 'Photo',
                readOnly: true
            },
            {
                type: 'dropdown',
                width: '140px',
                title: 'Name',
                source: [{
                    id: '2',
                    name: 'Jorge'
                }, {
                    id: '4',
                    name: 'Paul'
                }]
            },
            {
                type: 'text',
                width: '200px',
                title: 'Task'
            },
            {
                type: 'calendar',
                width: '100px',
                title: 'When'
            },
            {
                type: 'progressbar',
                width: '200px',
                title: '%'
            },
        ],
    }],
    updateTable: function(instance, cell, col, row, val, label, cellName) {
         if (col == 0) {
             let n = instance.options.data[row][col+1];
             if (n) {
                 let tmp = '<img src="/templates/default/img/' + n + '.jpg" class="users-small" />';
             } else {
                 let tmp = '<img src="/templates/default/img/nophoto.jpg" class="users-small" />';
             }
             // Only update when the content is different
             if (cell.innerHTML != tmp) {
                cell.innerHTML = tmp;
             }
         }
    },
});
</script>
</html>