Documentation
Most common questions and answers
What is the best way to create odd/even rows on a jexcel spreadsheet and tables?
How to transform multiple HTML static tables in dynamic jexcel tables?
How to disable paste over a jexcel spreadsheet?
How to intercept and change a pasted string over a jexcel table?
How to overwrite a type of a cell over a column type?
How to disabled the javascript contextmenu of my spreadsheet?
How to change the default download filename?
How to add an external action without losing the spreadsheet focus?
How to keep the selection of the spreadsheet clicking in a element outside.
Solution: Adding the following CSS code on your project.
.jexcel tbody tr:nth-child(even) { background-color: #EEE9F1 !important; }
var tables = document.querySelectorAll('table'); for (var i = 0; i < tables.length; i++) { jexcel(tables[i]); }
jexcel(document.getElementById('spreadsheet'), { onbeforepaste: function(instance, data, x, y) { return false; } });
jexcel(document.getElementById('spreadsheet'), { onbeforepaste: function(instance, data, x, y) { data = data.replace(',', '.', data); return data; } });
jexcel(document.getElementById('spreadsheet'), { columns: [ { type: 'text' }, { type: 'text' }, ], cells: { B2: { type:'number', mask:'$ #,##.00', decimal:'.' }, B3: { type:'percent' }, } });NOTE: Only available from jExcel Pro v7.
jexcel(document.getElementById('spreadsheet'), { columns: [ { type: 'text' }, { type: 'text' }, ], contextMenu: function() { return false; } });
jexcel(document.getElementById('spreadsheet'), { csvFileName: 'yourname' });
Working example:
https://jsfiddle.net/paulhodel/v5tbxg01/Add a class to the external element: jexcel_object