Products

Most common questions

  1. What is the best way to create odd/even rows on a Jspreadsheet spreadsheet and tables?

Solution: Adding the following CSS code on your project.

.jexcel tbody tr:nth-child(even) {
  background-color: #EEE9F1 !important;
}
  1. How to transform multiple HTML static tables in dynamic Jspreadsheet tables?

let tables = document.querySelectorAll('table');

for (var i = 0; i < tables.length; i++) {
    jspreadsheet(tables[i]);
}
  1. How to disable paste over a Jspreadsheet spreadsheet?

jspreadsheet(document.getElementById('spreadsheet'), {
    onbeforepaste: function(instance, data, x, y) {
        return false;
    }
});
  1. How to intercept and change a pasted string over a Jspreadsheet table?

jspreadsheet(document.getElementById('spreadsheet'), {
    onbeforepaste: function(instance, data, x, y) {
        data = data.replace(',', '.', data);
        return data;
    }
});
  1. How to overwrite a type of a cell over a column type?

jspreadsheet(document.getElementById('spreadsheet'), {
    columns: [
        { type: 'text' },
        { type: 'text' }, 
    ],
    cells: {
        B2: { type:'number', mask:'$ #,##.00', decimal:'.' },
        B3: { type:'percent' },
    }
});

NOTE: Only available on the Pro distribution.

  1. How to disabled the javascript contextmenu of my spreadsheet?

jspreadsheet(document.getElementById('spreadsheet'), {
    columns: [
        { type: 'text' },
        { type: 'text' }, 
    ],
    contextMenu: function() {
        return false;
    }
});