I have a handsontable with just under 100 rows of data, and 9 columns. I added a button to directly export the data in the handsontable to Excel. The button functionality works, and when clicked it will download an Excel file that can be opened. This file has all of the proper formatting, but it only contains 30-40 rows of the data in the handsontable. Scrolling down in the table before clicking the export button will result in a few more rows in the result, but it never returns all of the data.
The relevant jquery code can be seen here:
var tableContainer = document.getElementById('table');
tableHandson = new Handsontable(tableContainer, {
minSpareRows: 0,
columnSorting: true,
stretchH: 'all',
readOnly: true
});
//ajax call to get data and then load it is here.
$(window).load(function() {
$("#btnExport").click(function(e) {
window.open('data:application/vnd.ms-excel,' + encodeURIComponent($('#table').html()));
e.preventDefault();
});
});
.text() also only returns the same limited amount of data that .html is returning here.