Spreadsheet comments New

The JSS advance comments provides an easy way for your users to add multiple comments to a cell, that includes information about the user and date.

Author

Jspreadsheet Pro Team.

License

Available on the premium edition only.

Installation

Please choose one of the following options


Using CDN
Using NPM
<html>
<script src="https://jspreadsheet.com/v9/jspreadsheet.js"></script>
<script src="https://jsuites.net/v4/jsuites.js"></script>
<link rel="stylesheet" href="https://jspreadsheet.com/v9/jspreadsheet.css" type="text/css" />
<link rel="stylesheet" href="https://jsuites.net/v4/jsuites.css" type="text/css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons" />

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jspreadsheet/comments/dist/style.min.css" type="text/css" />

<script src="https://cdn.jsdelivr.net/npm/lemonadejs/dist/lemonade.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@jspreadsheet/comments/dist/index.min.js"></script>

<div id='spreadsheet'></div>

<script>
// License for Formula Plugin
jspreadsheet.license = 'your-license';

// Add-on for Jspreasheet
jspreadsheet.setExtensions({ comments });

// Define the information about the user
jspreadsheet.comments({
    user_id: 1000,
    name: 'John Lennon',
    image: 'img/lennon.png'
});

// Create the spreadsheets
jspreadsheet(document.getElementById('spreadsheet'), {
    toolbar: true,
    worksheets: [
        {
            minDimensions: [8,10],
            comments: {
                // Advance comments receive an object
                A3: [
                    {
                         name: 'George Michael',
                         image: 'img/4.jpg',
                         date: '2022-04-28 12:00:21',
                         comments: 'Please can you try that one?',
                    },
                    {
                         name: 'Miguel Rodrigues',
                         image: 'img/7359.jpg',
                         date: '2022-05-01 00:00:21',
                         comments: 'Yes. Can you send more details about the calculations?',
                    }
                ],
                // Simple comments (notes)
                F1: 'test',
             }
        },
    ],
});
</script>
</html>
// Jspreadsheet Pro
import jspreadsheet from 'jspreadsheet';

// Import extension
import comments from '@jspreadsheet/comments';

// Add a valid license
jspreadsheet.setLicense('your-license');

// Start the JSS plugin
jspreadsheet.setExtensions({ comments });

// Define information about the user
jspreadsheet.comments({
    user_id: 1000,
    name: 'John Lennon',
    image: 'img/lennon.png'
});

// Create a spreadsheet
jspreadsheet(document.getElementById('spreadsheet'), {
    toolbar: true,
    worksheets: [
        {
            minDimensions: [8,10],
            comments: {
                A3: [
                    {
                         name: 'George Michael',
                         image: 'img/4.jpg',
                         date: '2022-04-28 12:00:21',
                         comments: 'Please can you try that one?',
                    },
                    {
                         name: 'Miguel Rodrigues',
                         image: 'img/7359.jpg',
                         date: '2022-05-01 00:00:21',
                         comments: 'Yes. Can you send more details about the calculations?',
                    }
                ],
                F1: 'test',
             }
        },
    ],
});


Example

A new option is added to the context menu. Right-click above any cell and click in the Comments option.




Create applications with spreadsheet-like controls