Project management spreadsheet

A simple online task management spreadsheet.



JavaScript example

<html>
<script src="https://jspreadsheet.com/v10/jspreadsheet.js"></script>
<script src="https://jsuites.net/v5/jsuites.js"></script>
<link rel="stylesheet" href="https://jspreadsheet.com/v10/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>

<input type='button' value='Add new task' onclick="spreadsheet[0].insertRow()" />

<script>
// Set your JSS license key (The following key only works for one day)
jspreadsheet.setLicense('OTM3M2ExOTFiY2U5NDFkZTMwNzJlOTczNDc5NDIzY2U1MGEwMjAzODg3NTFlNDE3OTI3NTk4MTk2YTdkMjcxZWI4ZmY3YWNkZTllOGJlYjU4Mzg2MjI2M2MwMDllNDRiMWU0NGRkZTg0NzIwNjhmODY5MTljZGY1ZDM4NTEyYTYsZXlKdVlXMWxJam9pU25Od2NtVmhaSE5vWldWMElpd2laR0YwWlNJNk1UY3dPVEkyT1RJNU9Td2laRzl0WVdsdUlqcGJJbXB6Y0hKbFlXUnphR1ZsZEM1amIyMGlMQ0pqYjJSbGMyRnVaR0p2ZUM1cGJ5SXNJbXB6YUdWc2JDNXVaWFFpTENKamMySXVZWEJ3SWl3aWQyVmlJaXdpYkc5allXeG9iM04wSWwwc0luQnNZVzRpT2lJek5DSXNJbk5qYjNCbElqcGJJblkzSWl3aWRqZ2lMQ0oyT1NJc0luWXhNQ0lzSW1Ob1lYSjBjeUlzSW1admNtMXpJaXdpWm05eWJYVnNZU0lzSW5CaGNuTmxjaUlzSW5KbGJtUmxjaUlzSW1OdmJXMWxiblJ6SWl3aWFXMXdiM0owWlhJaUxDSmlZWElpTENKMllXeHBaR0YwYVc5dWN5SXNJbk5sWVhKamFDSXNJbkJ5YVc1MElpd2ljMmhsWlhSeklsMHNJbVJsYlc4aU9uUnlkV1Y5');
// Set the extensions
jspreadsheet.setFormulas({ formula });

// Custom formula
const PHOTO = function(photo) {
    if (! photo) {
        photo = 'nophoto';
    }
    return ' <img src="/templates/default/img/'+photo+'.jpg" class="users-small" />';
}
// Set the custom formulas
formula.setFormula({ PHOTO });

// Create the spreadsheet
var 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: '%'
            },
        ],
    }],
    oninsertrow: function(worksheet) {
        for (let j = 0; j < worksheet.rows.length; j++) {
            if (! worksheet.options.data[j][0]) {
                worksheet.setValue('A' + (j+1), '=PHOTO(B' + (j+1) + ')', true);
            }
        }
    }
});
</script>
</html>

React example

import React, { useRef } from "react";
import { Spreadsheet, Worksheet, jspreadsheet } from "@jspreadsheet/react";
import formula from '@jspreadsheet/formula-pro';

// Set the license
jspreadsheet.setLicense('OTM3M2ExOTFiY2U5NDFkZTMwNzJlOTczNDc5NDIzY2U1MGEwMjAzODg3NTFlNDE3OTI3NTk4MTk2YTdkMjcxZWI4ZmY3YWNkZTllOGJlYjU4Mzg2MjI2M2MwMDllNDRiMWU0NGRkZTg0NzIwNjhmODY5MTljZGY1ZDM4NTEyYTYsZXlKdVlXMWxJam9pU25Od2NtVmhaSE5vWldWMElpd2laR0YwWlNJNk1UY3dPVEkyT1RJNU9Td2laRzl0WVdsdUlqcGJJbXB6Y0hKbFlXUnphR1ZsZEM1amIyMGlMQ0pqYjJSbGMyRnVaR0p2ZUM1cGJ5SXNJbXB6YUdWc2JDNXVaWFFpTENKamMySXVZWEJ3SWl3aWQyVmlJaXdpYkc5allXeG9iM04wSWwwc0luQnNZVzRpT2lJek5DSXNJbk5qYjNCbElqcGJJblkzSWl3aWRqZ2lMQ0oyT1NJc0luWXhNQ0lzSW1Ob1lYSjBjeUlzSW1admNtMXpJaXdpWm05eWJYVnNZU0lzSW5CaGNuTmxjaUlzSW5KbGJtUmxjaUlzSW1OdmJXMWxiblJ6SWl3aWFXMXdiM0owWlhJaUxDSmlZWElpTENKMllXeHBaR0YwYVc5dWN5SXNJbk5sWVhKamFDSXNJbkJ5YVc1MElpd2ljMmhsWlhSeklsMHNJbVJsYlc4aU9uUnlkV1Y5');
// Set the extensions
jspreadsheet.setFormulas({ formula });

const PHOTO = function(photo) {
    if (! photo) {
        photo = 'nophoto';
    }
    return ' <img src="/templates/default/img/'+photo+'.jpg" class="users-small" />';
}
// Set the custom formulas
formula.setFormula({ PHOTO });

// Create the component
export default function App() {
    // Spreadsheet array of worksheets
    const spreadsheet = useRef();
    // Data
    const data = [
        [ '=PHOTO(B1)', '2', 'New products section', '2019-02-12', '80' ],
        [ '=PHOTO(B2)', '2', 'API integration', '2019-03-01', '100' ],
        [ '=PHOTO(B3)', '4', 'Deck', '2018-11-10', '30' ],
        [ '=PHOTO(B4)', '2', 'Prototype', '2019-01-12', '0' ],
    ]
    // Columns
    const 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: '%'
        },
    ];
    // Event to make sure the first cell is populated
    const oninsertrow = (worksheet) => {
        for (let j = 0; j < worksheet.rows.length; j++) {
            if (! worksheet.options.data[j][0]) {
                worksheet.setValue('A' + (j+1), '=PHOTO(B' + (j+1) + ')', true);
            }
        }
    }
    // Render data grid component
    return (
        <>
            <Spreadsheet ref={spreadsheet} oninsertrow={oninsertrow}>
                <Worksheet data={data} columns={columns} />
            </Spreadsheet>
            <input type={"button"} value={"Add new task"} onClick={() => spreadsheet.current[0].insertRow()} />
        </>
    );
}

Vue example

import { Spreadsheet, Worksheet } from "@jspreadsheet/vue";

const license = 'OTM3M2ExOTFiY2U5NDFkZTMwNzJlOTczNDc5NDIzY2U1MGEwMjAzODg3NTFlNDE3OTI3NTk4MTk2YTdkMjcxZWI4ZmY3YWNkZTllOGJlYjU4Mzg2MjI2M2MwMDllNDRiMWU0NGRkZTg0NzIwNjhmODY5MTljZGY1ZDM4NTEyYTYsZXlKdVlXMWxJam9pU25Od2NtVmhaSE5vWldWMElpd2laR0YwWlNJNk1UY3dPVEkyT1RJNU9Td2laRzl0WVdsdUlqcGJJbXB6Y0hKbFlXUnphR1ZsZEM1amIyMGlMQ0pqYjJSbGMyRnVaR0p2ZUM1cGJ5SXNJbXB6YUdWc2JDNXVaWFFpTENKamMySXVZWEJ3SWl3aWQyVmlJaXdpYkc5allXeG9iM04wSWwwc0luQnNZVzRpT2lJek5DSXNJbk5qYjNCbElqcGJJblkzSWl3aWRqZ2lMQ0oyT1NJc0luWXhNQ0lzSW1Ob1lYSjBjeUlzSW1admNtMXpJaXdpWm05eWJYVnNZU0lzSW5CaGNuTmxjaUlzSW5KbGJtUmxjaUlzSW1OdmJXMWxiblJ6SWl3aWFXMXdiM0owWlhJaUxDSmlZWElpTENKMllXeHBaR0YwYVc5dWN5SXNJbk5sWVhKamFDSXNJbkJ5YVc1MElpd2ljMmhsWlhSeklsMHNJbVJsYlc4aU9uUnlkV1Y5';

// Custom formula
const PHOTO = function(photo) {
    if (! photo) {
        photo = 'nophoto';
    }
    return ' <img src="/templates/default/img/'+photo+'.jpg" class="users-small" />';
}

// Set the custom formulas
formula.setFormula({ PHOTO });

export default {
    components: {
        Spreadsheet,
        Worksheet,
    },
    data() {
        // Data
        const data = [
            [ '=PHOTO(B1)', '2', 'New products section', '2019-02-12', '80' ],
            [ '=PHOTO(B2)', '2', 'API integration', '2019-03-01', '100' ],
            [ '=PHOTO(B3)', '4', 'Deck', '2018-11-10', '30' ],
            [ '=PHOTO(B4)', '2', 'Prototype', '2019-01-12', '0' ],
        ]
        // Columns
        const 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: '%'
            },
        ];
        // Event to make sure the first cell is populated
        const oninsertrow = (worksheet) => {
            for (let j = 0; j < worksheet.rows.length; j++) {
                if (! worksheet.options.data[j][0]) {
                    worksheet.setValue('A' + (j+1), '=PHOTO(B' + (j+1) + ')', true);
                }
            }
        }

        return {
            data,
            columns,
            oninsertrow,
            license
        };
    },
    template: `<Spreadsheet ref="spreadsheet" :license="license" :oninsertrow="oninsertrow">
        <Worksheet :data="data" :columns="columns" />
    </Spreadsheet>
    <input type='button' value='Add new task' onclick="spreadsheet[0].insertRow()" />`,
}

Angular example

import { Component, ViewChild, ElementRef } from "@angular/core";
import * as jspreadsheet from "jspreadsheet";

import "/node_modules/jsuites/dist/jsuites.css";
import "/node_modules/jspreadsheet/dist/jspreadsheet.css";

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

// Custom formula
const PHOTO = function(photo) {
    if (! photo) {
        photo = 'nophoto';
    }
    return ' <img src="/templates/default/img/'+photo+'.jpg" class="users-small" />';
}

// Set the custom formulas
formula.setFormula({ PHOTO });

@Component({
  selector: "app-root",
  template: `<div #spreadsheet></div>`
})
export class AppComponent {
    @ViewChild("spreadsheet") spreadsheet: ElementRef;
    // Worksheets
    worksheets: jspreadsheet.worksheetInstance[];
    // Create a new data grid
    ngAfterViewInit() {
        // Create spreadsheet
        this.worksheets = 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: '%'
                    },
                ],
            }],
            oninsertrow: function(worksheet) {
                for (let j = 0; j < worksheet.rows.length; j++) {
                    if (! worksheet.options.data[j][0]) {
                        worksheet.setValue('A' + (j+1), '=PHOTO(B' + (j+1) + ')', true);
                    }
                }
            }
        });
    }
}