Comments on your javascript spreadsheet

jExcel Pro javascript vanilla spreadsheet plugin allows the user to set custom comments for each individual cells. By allowComments in the initialization, the user will be able to add comments in the rigth click contextMenu.

Manage cell comments programmatically

To apply comments via javascript, you can use the methods setComments or getComments, as follow:

Source code

<script src=""></script>
<link rel="stylesheet" href="" type="text/css" />

<script src=""></script>
<link rel="stylesheet" href="" type="text/css" />

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

var data1 = [
    ['US', 'Cheese', '2019-02-12'],
    ['CA', 'Apples', '2019-03-01'],
    ['CA', 'Carrots', '2018-11-10'],
    ['BR', 'Oranges', '2019-01-12'],

mySpreadsheet = jexcel(document.getElementById('spreadsheet'), {
    data: data1,
    columns: [
            type: 'dropdown',
            type: 'text',
            type: 'calendar',
     comments: {
        B1: 'Initial comments on B1',
        C1: 'Iniatial comments on C1'
     allowComments: true,
     license: '39130-64ebc-bd98e-26bc4',

<button type="button" onclick="mySpreadsheet.setComments('A1', 'This is the comments from A1');" style="width:220px;">Set A1 comments</button>
<button type="button" onclick="alert(mySpreadsheet.getComments('A1'));" style="width:220px;">Get A1 comments</button>
<button type="button" onclick="mySpreadsheet.setComments('A1', '');" style="width:220px;">Reset A1 comments</button>