Most common questions
-
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; }
-
How to transform multiple HTML static tables in dynamic Jspreadsheet tables?
var tables = document.querySelectorAll('table'); for (var i = 0; i < tables.length; i++) { jspreadsheet(tables[i]); }
-
How to disable paste over a Jspreadsheet spreadsheet?
jspreadsheet(document.getElementById('spreadsheet'), { onbeforepaste: function(instance, data, x, y) { return false; } });
-
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; } });
-
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. -
How to disabled the javascript contextmenu of my spreadsheet?
jspreadsheet(document.getElementById('spreadsheet'), { columns: [ { type: 'text' }, { type: 'text' }, ], contextMenu: function() { return false; } });