Jquery spreadsheet
To develop a web-based spreadsheet using jQuery and Jspreadsheet, it is necessary to incorporate the following polyfill starting from version 10.
<html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://jspreadsheet.com/v11/jspreadsheet.js"></script>
<link rel="stylesheet" href="https://jspreadsheet.com/v11/jspreadsheet.css" type="text/css" />
<script src="https://jsuites.net/v5/jsuites.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v5/jsuites.css" type="text/css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons" />
<div id="spreadsheet"></div>
<br>
<input type="button" value="Add new row" onclick="$('#spreadsheet').jspreadsheet('insertRow')" />
<input type="button" value="Add new col" onclick="$('#spreadsheet').jspreadsheet('insertColumn')">
<script>
// Polyfill
(function($){
$.fn.jspreadsheet = $.fn.jexcel = function(mixed) {
let container = $(this).get(0);
if (! container.jspreadsheet) {
return jspreadsheet($(this).get(0), arguments[0]);
} else {
if (typeof(arguments[0]) == 'number') {
let n = arguments[0];
let i = 2;
} else {
let n = 0;
let i = 1;
}
return container.jspreadsheet[n][mixed].apply(
container.jspreadsheet[n],
Array.prototype.slice.call(arguments, i)
);
}
};
})(jQuery);
$('#spreadsheet').jspreadsheet({
worksheets: [{
minDimensions:[8,10],
}],
license: 'NzQ3YzM0YzA0NDU0NmFhYWM3Yjc4NmQwMGU0MTFkNzA5ODFiMjVmYmZlZTA0NGVhMmM4ODdjMDRiNzI2MDIyOWJkNGFmYzg3NWNiYTMyMDhlMDNlNTlkMTllZGI3ZDU3NWEzMDFjZGFhZTdhNWY2NDQzNDZiNGQ0NDRkMDNhMTksZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpNME9EY3dOelV3TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0ozWldJaUxDSnNiMk5oYkdodmMzUWlYU3dpY0d4aGJpSTZJak0wSWl3aWMyTnZjR1VpT2xzaWRqY2lMQ0oyT0NJc0luWTVJaXdpZGpFd0lpd2lkakV4SWl3aVkyaGhjblJ6SWl3aVptOXliWE1pTENKbWIzSnRkV3hoSWl3aWNHRnljMlZ5SWl3aWNtVnVaR1Z5SWl3aVkyOXRiV1Z1ZEhNaUxDSnBiWEJ2Y25SbGNpSXNJbUpoY2lJc0luWmhiR2xrWVhScGIyNXpJaXdpYzJWaGNtTm9JaXdpY0hKcGJuUWlMQ0p6YUdWbGRITWlMQ0pqYkdsbGJuUWlMQ0p6WlhKMlpYSWlMQ0p6YUdGd1pYTWlYU3dpWkdWdGJ5STZkSEoxWlgwPQ=='
});
</script>
</html>